Mikubill / sd-webui-controlnet

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

Annotator resolution is limited to 1024, and if output set to a higher resolution (for example, 1536), 1024 limit can significantly degrades output quality, especially for "canny" model #121

Closed Lissanro closed 1 year ago

Lissanro commented 1 year ago

My 8GB video card allows me to generate images up to 1536x1536 and I think higher end card can handle even higher resolution. I suggest to increase Annotator resolution limit to 2048. The same applies to "HED Resolution", "Midas resolution", "Normal resolution", "Hough resolution", which are currently limited to 1024 resolution too.

This is important, because otherwise ControlNet image gets upscaled and this degrades output quality significantly, at least this is the case with canny model and preprocessor. If I want to generate 1536x1536 image, I need to be able to increase Annotator resolution to 1536 to get the expected result. I modified the code and I can confirm that 1536 size works without issues even on 8GB card, this is why I think 2048 could be a good upper limit.

Also, I noticed that if Preprocessor is "none", "Annotator resoultion" slider is disabled by default, which makes sense, but if I choose some other preprocessor, and then "none" again, "Annotator resolution" slider becomes enabled, even though it has no effect on anything as far as I can tell.

Lissanro commented 1 year ago

The Pull Request was merged so this issue is resolved.