[Bug]: Highres fix outputs wrong resolution when certain resolutions are specified
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
-
Create a new txt2img and specify the following settings:

-
Press generate.
-
The output image will have a different resolution that specified in highres fix.

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
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.
For anyone else looking for more info on this:
- #4906
- #4094
- #4978
- #7601