Skip to content
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

Highres Fix is currently broken for non-512x512 ratio images #903

Closed
MosJef0 opened this issue Sep 23, 2022 · 1 comment
Closed

Highres Fix is currently broken for non-512x512 ratio images #903

MosJef0 opened this issue Sep 23, 2022 · 1 comment
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@MosJef0
Copy link

MosJef0 commented Sep 23, 2022

NOTE: This bug was reported earlier by Sirush and was erroneously closed as not being a bug, which was an error as this functionality is most definitely not working as intended, so please test this further before dismissing it.

Right now the "Highres. Fix" option is resulting in a completely different image when enabled for an image that is any size other than 512x512. I ran into this issue independently from Sirush and verified it by rendering two 512x768 images with identical settings -- the only change was toggling the Highres Fix option on and off. The two images are completely different, despite selecting a low denoising value:

With Highres on:

1

With Highres off:

00278-2738465260-detailed cyberpunk character portrait of an anthropomorphic chipmunk, wild, highly detailed, digital painting, artstation, conce

I then confirmed this by doing the same test with an image at 512x512.

With Highres on:

00281-2738465259-detailed cyberpunk character portrait of an anthropomorphic chipmunk, wild, highly detailed, digital painting, artstation, conce

With Highres off:

00282-2738465259-detailed cyberpunk character portrait of an anthropomorphic chipmunk, wild, highly detailed, digital painting, artstation, conce

I then tested again at 896x896 to see if maintaining a 1:1 ratio would affect the outcome.

With Highres on:

00283-2738465259-detailed cyberpunk character portrait of an anthropomorphic chipmunk, wild, highly detailed, digital painting, artstation, conce

With Highres off:

00284-2738465259-detailed cyberpunk character portrait of an anthropomorphic chipmunk, wild, highly detailed, digital painting, artstation, conce

As you can see, maintaining a 1:1 ratio resulted in the same image as the 512x512 images with Highres Fix enabled, but resulted in a completely different image when it was turned off.

I also suspect that the issue with Highres Fix runs deeper than just a seed problem: The pictures that I've rendered at higher resolutions with Highres Fix enabled come out looking like simple resizes of smaller resolutions, without the additional detail you would expect from rendering at higher resolutions.

My understanding of Highres Fix is that it first diffuses an image at a lower resolution to "bake in" the composition, then switches it to the higher resolution and continues diffusing, resulting in a very high-quality image with the same content as the smaller image. At least that's how it appeared to function a few days ago, but something seems to have altered its behavior for the worse in a recent update.

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome
  • Commit revision 19fc3e8

UPDATE: I can now confirm that Highres Fix is working differently than before and resulting in lower resolution images. I found an image that I had diffused two days ago using the Highres Fix option, and just ran it again using all of the exact same parameters:

Original (Tuesday) Highres Fix image:

00119-3688730377-Space wars by Alex grey, Paul Lehr, Ron walotsky, Bruce Pennington, and James gurney

Current Highres Fix Image:

00285-3688730377-Space wars by Alex grey, Paul Lehr, Ron walotsky, Bruce Pennington, and James gurney

If you open the two images up and view them at 100% size, you will see that the first image contains a lot more detail and looks like it was actually diffused at high (1920x1088) resolution, whereas the new image looks like it has just been blown up without any additional diffusion. However, it did still go through another 50 iterations (the Denoising strength for both images was set to .7), so I'm not sure why the resolution is so low.

I would recommend rolling back any recent changes to Highres Fix until it is...er, fixed.

@MosJef0 MosJef0 added the bug-report Report of a bug, yet to be confirmed label Sep 23, 2022
@C43H66N12O12S2
Copy link
Collaborator

C43H66N12O12S2 commented Sep 23, 2022

Hires fix samples at a fixed resolution of 512x512 for the first step and then uses your resolution for the final step. This is why it will change your image - the same seed will produce different images at different resolutions. You can use seed resize to mitigate this.

@AUTOMATIC1111 It'd be nice if hires fix used a division of the specified resolution for the first step to "fix" this.

Edit: Actually, I think it already functions as a division. No clue why this happens, then.

nne998 pushed a commit to fjteam/stable-diffusion-webui that referenced this issue Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

3 participants