coolzilj / Blender-ControlNet

Using ControlNet right in Blender.
MIT License
760 stars 68 forks source link

Script uses only one ControlNet #20

Closed weakman54 closed 1 year ago

weakman54 commented 1 year ago

The script will always use the topmost enabled ControlNet only, even when Multi ControlNet: Max models amount is increased (This setting should probably be part of the readme).

If the above setting is set to 1, the console will only show loading one ControlNet, even if more are enabled. If the setting is increased, they will load (according to the console), but the image still looks the same as if it only used one controlnode.

If I manually input the blendergenerated images into the webUI interface for each model, then the generated image looks correct.

I also tried changing the settings to match the script, which gave a different (but still good) result (on the same seed, ofc).

As a sidenote, for manual input, should Canny be preprocessed or not?

weakman54 commented 1 year ago

Hm, actually, it seems like it's the Canny network that is faulty, if you input the canny image in the webui as is, it generates the same type of weird image. It might be related to the fact that the Canny image generates as all white, and is then used as is, rather than preprocessed through the canny edgedetection

weakman54 commented 1 year ago

Inverting the Canny output before saving it to file in blender essentially fixes the problem, though the face is not processed properly I think, still

coolzilj commented 1 year ago

The script will always use the topmost enabled ControlNet only, even when Multi ControlNet: Max models amount is increased (This setting should probably be part of the readme).

You're right, just added to readme. Canny can be tricky as the Invert Input Color may not always works for me.

Natotela commented 1 year ago

I got an error in blender's cmd window {"detail":"Script \'controlnet\' not found"}

what am I missing?

coolzilj commented 1 year ago

I got an error in blender's cmd window {"detail":"Script 'controlnet' not found"}

what am I missing?

Did you upgrade SD and ControlNet extension to latest version? Did you enable Allow other script to control this extension in settings for API access.

Natotela commented 1 year ago

ok I did had another pull to go with CN, SD was already up to date; the error I got earlier is gone and i am getting a generated image, but I am also getting this every step in SD cmd window

Error executing callback cfg_denoiser_callback for F:\Progz\stable-diffusion-webui\extensions\SD-latent-mirroring\scripts\latent_mirroring.py Traceback (most recent call last): File "F:\Progz\stable-diffusion-webui\modules\script_callbacks.py", line 167, in cfg_denoiser_callback c.callback(params) File "F:\Progz\stable-diffusion-webui\extensions\SD-latent-mirroring\scripts\latent_mirroring.py", line 33, in denoise_callback if self.run_callback and params.sampling_step < params.total_sampling_stepsself.mirroring_max_step_fraction: TypeError: unsupported operand type(s) for : 'int' and 'NoneType'

coolzilj commented 1 year ago

ok I did had another pull to go with CN, SD was already up to date; the error I got earlier is gone and i am getting a generated image, but I am also getting this every step in SD cmd window

Error executing callback cfg_denoiser_callback for F:\Progz\stable-diffusion-webui\extensions\SD-latent-mirroring\scripts\latent_mirroring.py Traceback (most recent call last): File "F:\Progz\stable-diffusion-webui\modules\script_callbacks.py", line 167, in cfg_denoiser_callback c.callback(params) File "F:\Progz\stable-diffusion-webui\extensions\SD-latent-mirroring\scripts\latent_mirroring.py", line 33, in denoise_callback if self.run_callback and params.sampling_step < params.total_sampling_stepsself.mirroring_max_step_fraction: TypeError: unsupported operand type(s) for : 'int' and 'NoneType'

It appears that the SD-latent-mirroring extension is causing this issue. You may want to open an issue in their repo or just disable this extension if you don't actually use it.