Mikubill / sd-webui-controlnet

WebUI extension for ControlNet
GNU General Public License v3.0
16.42k stars 1.91k forks source link

[Bug]: Controlnet only works when the checkbox of enabled is disabled. It is the complete opposite of how it should function #2875

Closed CRCODE22 closed 1 month ago

CRCODE22 commented 1 month ago

Is there an existing issue for this?

What happened?

Controlnet will not work when enabled is checked but it will work when enabled is unchecked.

Steps to reproduce the problem

Just setup controlnet with multi input images and check the enabled box and low vram and pixel perfect it will not work but when you uncheck the enabled it will work.

What should have happened?

When the checkbox of enabled is checked it should work but the opposite is true it needs to be unchecked in order for controlnet to be enabled.

Commit where the problem happens

webui: Latest version of Automatic1111 and WebUI Forge controlnet: ControlNet v1.1.448

What browsers do you use to access the UI ?

Mozilla Firefox, Google Chrome

Command Line Arguments

--xformers

List of enabled extensions

Only the build in and ControlNet v1.1.448

Console logs

Not relevant there is no errors

Additional information

No response

huchenlei commented 1 month ago

I cannot reproduce this issue. I did following steps on the UI

The observation is that ipadapter is correctly applied.

CRCODE22 commented 1 month ago

I am using two controlnets and each have at least 32 pictures in them

2024-05-10 21:42:18,158 - ControlNet - INFO - Loading model from cache: ip-adapter-plus_sdxl_vit-h [bc449f62] 2024-05-10 21:42:19,407 - ControlNet - INFO - Using preprocessor: ip-adapter_clip_sdxl_plus_vith 2024-05-10 21:42:19,408 - ControlNet - INFO - preprocessor resolution = 816 2024-05-10 21:42:23,797 - ControlNet - INFO - IP-Adapter using advanced weighting [0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6, 0.6] 2024-05-10 21:42:27,271 - ControlNet - INFO - IP-Adapter using advanced weighting [0.55, 0.55, 0.55, 0.55, 0.55, 0.55, 0.55, 0.55, 0.55, 0.55, 0.55] 2024-05-10 21:42:35,065 - ControlNet - INFO - ControlNet Hooked - Time = 20.145877838134766

3425343452134234

As you can see it works when disabled.

CRCODE22 commented 1 month ago

Also try entering a seed value rather than -1

CRCODE22 commented 1 month ago

SD.Next does not have this problem with controlnet the problem is only with automatic1111 and webui forge both latest dev and master branches.

Soulreaver90 commented 1 month ago

Yeah I am having crazy weird issues since the recent batch of updates. Previously if i sent an old generation to txt2img, controlnet will update to match the settings of the image, so controlnet would enabled and processor set correctly. That isn't the case anymore. As well I am having issues where controlnet isn't enabled even if I have it set. I have to start a generation, cancel it, uncheck and recheck enable and then it will work. The second part to this issue is when I change the image for face id. If I change it and try to generate, it seems to use whatever the last images were. I have to either remove the lora and repeat the previous steps, or play with the checkbox until it works. Sorry its confusing, I dont have time to go into detail the issues and steps, it's just all been finicky lately.

Positives: Performance seems to have improved on SD1.5, used to have weird memory errors but seems to be snappier. Cant say the same for SDXL, my 12gb can't handle it lol

huchenlei commented 1 month ago

I think this is caused by data racing when you clicked the generation button. Sometimes the state update get called before A1111 get the args, sometimes it is not.

I have restored that part of code from previous refactoring PR. Hopefully this issue can be resolved from A1111 main repo later.