-
Notifications
You must be signed in to change notification settings - Fork 25.7k
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
[Bug]: Scale by 1x in 1.7.0 does nothing on "Extras tab" and "SD Upscale" script #14738
Comments
The issue is being caused by this commit: 4a66638 stable-diffusion-webui/modules/upscaler.py Lines 59 to 68 in cf2772f
You can either revert the change to upscaler.py, or do something like the following and it will fix 1x scale models, while partially retaining the intentions of the commit to at least abort when input size > output size, but not equal. The line at bottom may not be needed (maybe it does nothing?), but I re-added it just in case.
The proper solution here would likely be to store the internal model scale somewhere (see https://github.com/chaiNNer-org/chaiNNer/blob/main/backend/src/packages/chaiNNer_pytorch/pytorch/utility/get_model_scale.py for reference for how model scale can be grabbed), and only abort the input size == output size case when the model scale is >1. Maybe the webui could parse all upscale models when loaded and add the model scale value to cache.json or something. Though this is just a random thought, as it may make the code too complex for such a simple intention. |
Thanks a lot. Changing just this line fixes all issues: |
This is a great and simple solution! Now we can even just sharpen/enhance an image without resizing it using 4x-UltraSharp or something like that! |
Checklist
What happened?
In 1.7.0 version of Webui, if I select a scale factor of 1 when processing an image on the Extras tab or in the SD upscale script on Img2img tab, then the image is processed with no changes. I don't need to resize the image, I just want to use 1x Denoise model, 1x Colorize model or 1x Texturize model or other 1x GAN models with upscale factor of 1. In 1.5.2 webui version everything worked as expected.
Steps to reproduce the problem
What should have happened?
The image must be denoised, colorised or textured without resizing, depending on the selected upscaler model
What browsers do you use to access the UI ?
No response
Sysinfo
Console logs
Additional information
No response
The text was updated successfully, but these errors were encountered: