stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Bug]: Highres fix outputs wrong resolution when certain resolutions are specified

Open SeanBannister opened this issue 2 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

When using Highres fix and specifying a resize height and width the outputted PNGs resolution doesn't match that specified in Highres Fix. This only happens for certain resolutions such as 1080 x 1351 which is outputted as 1080 x 1344.

I've tested this locally and on Google Colab.

Steps to reproduce the problem

  1. Create a new txt2img and specify the following settings: image

  2. Press generate.

  3. The output image will have a different resolution that specified in highres fix.

image

What should have happened?

The resolution of the outputted PNG file should match the specified resolution in Highres Fix.

Commit where the problem happens

https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--medvram --xformers --api

List of extensions

stable-diffusion-webui-images-browser

Console logs

.

Additional information

No response

SeanBannister avatar Mar 09 '23 05:03 SeanBannister

Apparently, resolutions used in SD must be a multiple of 8. It's using the closest one from below. If you use 1352 it will be happy.

acorderob avatar Mar 09 '23 15:03 acorderob

For anyone else looking for more info on this:

  • #4906
  • #4094
  • #4978
  • #7601

SeanBannister avatar Mar 10 '23 04:03 SeanBannister