automatic icon indicating copy to clipboard operation
automatic copied to clipboard

[Issue]: ControlNet pipeline is not autodetected after using other pipelines

Open solsol360 opened this issue 2 years ago • 1 comments

Issue Description

Issue: ContolNet pipeline is not selected automatically after using img2img or inpaint (haven't tested others). 'Diffusers pipeline' -option is set to Autodetect.

Debug log attached. sdnext.log

Version Platform Description

Python 3.10.11 on Windows Version: app=sd.next updated=2023-12-30 hash=ab7b78cc url=https://github.com/vladmandic/automatic.git/tree/master Platform: arch=AMD64 cpu=AMD64 Family 25 Model 97 Stepping 2, AuthenticAMD system=Windows release=Windows-10-10.0.22631-SP0 python=3.10.11

Relevant log output

Generating img2img (pipeline changed to StableDiffusionImg2ImgPipeline)
2024-01-04 22:37:48,133 | sd | DEBUG | sd_models | Pipeline class change: original=StableDiffusionPipeline target=StableDiffusionImg2ImgPipeline

Returning to Control tab:
2024-01-04 22:38:01,641 | sd | DEBUG | ui_control | Control: tab=controlnet job=task(fxsdcr4u3w4csj5) args=(0, 'test', '', [], 20, 0, -1.0, -1.0, 0, 0, 0, 4, 1, 4, 0.7, True, False, False, False, 4, 0.95, False, 1, 1, False, 0.6, 1, 1, 'None', 512, 512, 1, 0, 'Before', 0.5, 1, 1, 0, 'None', 2, True, 1, 0, 'none', 0.5, None, 0)

Click Generate:
2024-01-04 22:38:01,644 | sd | DEBUG | run | Control ControlNet unit: process=Canny model=Canny strength=1.0 guess=False start=0 end=1

Pipeline is still 'StableDiffusionImg2ImgPipeline' and causes an error
2024-01-04 22:38:01,645 | sd | ERROR | controlnet | Control ControlNet pipeline: class=StableDiffusionImg2ImgPipeline unsupported model type


Only when going back to Text-tab and generating something, the pipeline is change to StableDiffusionPipeline:
2024-01-04 22:38:23,775 | sd | DEBUG | sd_models | Pipeline class change: original=StableDiffusionImg2ImgPipeline target=StableDiffusionPipeline


And then going back to Control tab, the program can autodetect StableDiffusionControlNetPipeline when clicking Generate
2024-01-04 22:38:30,256 | sd | DEBUG | run | Control ControlNet unit: process=Canny model=Canny strength=1.0 guess=False start=0 end=1
2024-01-04 22:38:30,266 | sd | DEBUG | controlnet | Control ControlNet pipeline: class=StableDiffusionControlNetPipeline time=0.01

Same happens if you first do inpainting:

2024-01-04 22:39:07,916 | sd | ERROR | controlnet | Control ControlNet pipeline: class=StableDiffusionInpaintPipeline unsupported model type

Backend

Diffusers

Branch

Master

Model

SD 1.5

Acknowledgements

  • [X] I have read the above and searched for existing issues
  • [X] I confirm that this is classified correctly and its not an extension issue

solsol360 avatar Jan 04 '24 21:01 solsol360

fixed in dev, will be merged to master in the next release (soon)

vladmandic avatar Jan 05 '24 01:01 vladmandic