Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable run preprocessor if no cn input image #1887

Merged
merged 2 commits into from
Aug 7, 2023
Merged

disable run preprocessor if no cn input image #1887

merged 2 commits into from
Aug 7, 2023

Conversation

Guillaume-Fgt
Copy link
Contributor

In response to issue #1867 and related to PR #1747, I suggest those modifications to the Javascript code.

The run preprocessor button is enabled only if an image input exists in the ControlNet input tab. The hint of the button is changed accordingly.

One problem I have:
at the first start of webui, the button is enabled without any input image. I don't know where in the code I can change this initial state. But I don't think it is a big issue as the user will not expect any result with a totally blank canvas I believe.

@huchenlei huchenlei self-requested a review August 7, 2023 20:52
@huchenlei
Copy link
Collaborator

I moved the detection logic to active_units.js as this logic should work for both txt2img and img2img tabs.

@huchenlei huchenlei merged commit 256a53a into Mikubill:main Aug 7, 2023
1 check passed
tiangles pushed a commit to diffus-me/sd-webui-controlnet that referenced this pull request Aug 18, 2023
* disable run preprocessor if no cn input image

* 🚧 Move detection logic to active_units.js

---------

Co-authored-by: huchenlei <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants