-
Notifications
You must be signed in to change notification settings - Fork 52
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
Confliction of A1111 extension of PwW+Control to the original extension of ControlNet #38
Comments
Just to update the progress. Although this error can be fixed by changing the script to
while it takes an unreasonably long time to load UI instead. |
What is the reason why it loads so slowly when I apply this fix to preload.py? Is it reloading things multiple times? |
I had update the preload.py to avoid the confliction of arguments. On the other hand, it turns out the program is stuck at updating ui at the line 845 of scripts/controlnet.py Please see the explanation here |
It seems to be another conflict since commenting line 845 works for my case, which I test it on Windows, Linux, and MACOS. Just to confirm, do these extensions compatible with Mikubill/sd-webui-controlnet? |
Yes, Controlnet works with these and they do not cause problems with each other. |
Hi @mykeehu , thanks a lot for your information. It's kinda weird to me since the two repo basically is doing the same thing. However, I guess this bug might come from duplicated UI, which is created when I inherit the UI of controlnet to create the UI for ControlNet+PwW.
and let me know if it works or not. If it still doesn't work, please disable Mikubill/sd-webui-controlnet and uncomment line 845, which now becomes line 965 of controlnet.py Thank you so much for your report :) |
Very interesting...
and the UI still does not load... Now I deleted the folder and reinstalled it with this command in extension folder, but no helped: |
Hmm... it's indeed interesting but also makes things clearer. (a) Let's try a bit simpler version,
where I add a dummy flag to disable all the PwW modules and UI. The PwW is disable when the flag is set to True. In this case, the function of this repo should be exactly the same as Mikubill/sd-webui-controlnet. (b) If that does not works for you, then try this version
where I comment all the code associated with PwW and exactly match the code of Mikubill/sd-webui-controlnet; it should work for you as you mentioned previously. Note that the Mikubill/sd-webui-controlnet I fork is the latest version (commit dbdd6b1), please also check if this veriosn works for you. Also, please check if you got the latest A1111 webui installed and let me know the gradio version you got. I'd assume at least (b) should work as it is exactly the code of Mikubill/sd-webui-controlnet. Lastly, thank you so much for your patience in figuring out the bug with me :) |
The UI worked fine on the first version, but I got an interesting error message on the console after loaded embeddings:
I'll try version b in a moment, but this is how I retrieve it from git, because I get an error on your command:
The second version is also tested, the UI works there too. No other extensions were installed when I tested it. |
It's great at least the dummy version works, except for the error message on the console after loaded embeddings (we can come back to this issue after making PwW UI work for you. The code of PwW in "scripts/controlney.py" is basically doing 3 things, which will be checked gradually in the rest of debugging steps: Steps:
(b) If (a) works, please try this version that enable (1) and (2)
I'd expect some error at this stage from the gradio warning message you showed a moment ago.
If you encounter the same gradio warning, try this version
that I disable the some of UI initialization utilizing "create_canvas". Thanks you so much for your effort and information :) |
Here are the final results:
|
Thanks a lot for the results. (a) Please try this version that I further comment the UI of "Color context option" that might leads to problem.
The rest of UI is simple gradio component, as usual as in the Controlnet UI, and should be safe. (b) If this version work, please set the dummy flag to false to enable PwW function. This would not change UI but activate (3) Apply the hook and Inject CrossAttention forward function. I hope we are reaching the end of debugging, thanks again for your patience and help :) |
Hmm... not sure what causes the error here.
make it work for you. If this is the case, let's try this,
which simply remove 'with gr.Column()' for "strengths". It might be also worthwhile to check other arrangements of UI here. |
Good to know it finally work!! The parameter affect PwW is as follows (maybe I should add it to REAMDE):
I typically set eta=1.0 for inpainting and eta=0.5 for txt-img |
Thanks for the great suggestion! I had updated the main branch to rename "strength" to "prompt strength". Please have a try.
not sure which one works for you. btw, can you please share your branch of PwW repo to me? |
I reinstalled it from the master link and it works, so that's a tick, it's fine. I disabled Controlnet before, so no problem. |
Otherwise, your solution is similar to the Latent Couple extension, only it generates without colors, for fixed areas. What's good about your extension is that it would be able to generate freely, anywhere, into any shape, plus you don't need to use AND to generate, because you have the prompt for the colors. |
The Latent Couple extension also has a fork which includes the use of a color mask https://github.com/ashen-sensored/stable-diffusion-webui-two-shot check readme. |
@nistvan86 Thank you, that's exactly what I thought, and it turns out it exists. I will try it! The concept and idea is perfect, but unfortunately it doesn't work for him :( |
@mykeehu I've experimented with the add-on and it's a hit and miss sometimes. It seems to work if you apply it for a few things, but it very quickly falls apart when the layout is too complex. I believe it's better to incorporate the mask associated prompts into the generic prompt as well, and also describe the whole scene with extra things. (I didn't do this in the linked example though). So eg. in your case, maybe you should mention in the generic prompt that there's a dog between them. |
A Latent Couple works very well by default, I took a pretty complex picture with it, i.e. a man, two women, cuddling, with Controlnet, Lora and TI. |
The Latent Couple is amazing, for both its implementation and results! See the benchmark on one of the examples with prompt
The results are ok, and the rest are just a matter of cherry-picking and parameter tuning (e.g. alpha blend, weight). So far, I don't see the advantages of PwW compared to this latent couple implementation. The additional "AND" doesn't seem to bother users.
From this sense, PwW would have better control than LC while I don't see much improvement in this case. |
The current implementation conflict with the original extension of ControlNet, as reported by @mykeehu, here.
This is caused by the same argument defined in preload.py in the extension.
I'm trying to fix this bug, and open this issue for further discussion if there is any.
The text was updated successfully, but these errors were encountered: