-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Repair ControlNet infotext parsing #1833
Conversation
Active units is listening enable checkbox change and tab change events to update tab status. Setting checkbox value directly from scripts cannot be observed by js. A workaround would be add a listener to those |
Thanks -- would need to make sure to account for the |
Hey @catboxanon, I finally got some time to fix this issue. Can you confirm that the PR is good after my change? |
Working for me -- thanks! |
I think there is a big blocker for values to be pasted from infotext: When module(preprocessor) value is updated, an update will be triggered to set the values of all sliders to the default value for the selected module. This behaviour will overwrite the pasted value from infotext for those sliders. |
🚧 Listen png info buttons WIP New infotext format nits nits nits rebase refactor active unit counts
The slider issue is very hard to fix. I think gradio has some hard time handling these concurrent updates. I tried the following approach and it does not work:
However, when A1111 paste the infotext to ControlNetUnit, when So I decided to leave this for later, and just submit the feature with this minor bug. |
Closes #1793
This was broken (and has been for quite some time now) after ControlNet params started being stored altogether as part of a single key and not separate keys per param. The ideal solution would be rework how this is handled altogether so it accounts for more parameters in a cleaner way, but this is just patching the functionality that previously existed for now.
This also allows the
Parse ControlNet parameters in infotext
setting (previously titledPassing ControlNet parameters with "Send to img2img"
which is unclear and technically incorrect since it also applies to txt2img) to be handled at runtime rather than requiring a restart of the webui, as the setting previously was only taken into account during the UI creation process.Setting as a draft becauseactive_units.js
doesn't trigger UI updates when the infotext is parsed currently. Not sure what's going on as it does recognize the changes once the ControlNet tab is switched or theEnabled
checkbox is unticked (easier to see this behavior if loading the infotext from an image using multiple ControlNet modules).