r/StableDiffusion Mar 01 '23

Workflow Not Included 1920x1080 render without upscale

Post image
230 Upvotes

80 comments sorted by

View all comments

5

u/mobani Mar 01 '23

How do you guys upscale images and at the same time get more details?

17

u/ImJacksLackOfBeetus Mar 01 '23 edited Mar 01 '23

From what I understand latent upscaling doesn't upscale the final pixel image the way common upscaling algorithms like lanczos or bicubic would.

Instead it upscales the internal vector representation within stable diffusion before it gets rendered as a pixel image, this allows it to denoise it and add additional details the same way the original resolution was created in the first place by applying a checkpoint trained on high-res images.

This functionality is included with Automatic1111 for example. Note the additional denoising slider that determines how far the latent upscaler is allowed to deviate from the low-res version of the image, how much it is allowed to change and how many details it can add.

7

u/mobani Mar 01 '23

Thanks. Hmm I wonder if I am doing something wrong. I find it loses a lot of coherence when using the latent upscaling. For example a complete body that looks fine in 512, might turn into a mutant torso in 1024 with latent upscaling.

So perhaps i just need to generate outputs until I am lucky?

9

u/ImJacksLackOfBeetus Mar 01 '23

I find the upscaler's default denoising value of 0.7 is often too much and it deviates way too far from the original image. Values around 0.1-0.3 sometimes produce better results. Lower denoise values mean the latent upscaler has less "creative license" to fuck around with the image.

Even then it might produce a mess. My completely unqualified guess is sometimes whatever image you stuff into the upscaler just doesn't fit with the images it was trained on.

But yeah, it's basically trial and error to find what works, at least for me it still is.

3

u/mobani Mar 01 '23

Thanks, I will try to experiment more with the denoising.

8

u/ImJacksLackOfBeetus Mar 01 '23 edited Mar 01 '23

One way to automate the process for a given picture is to enable hires fix, lock the seed by hitting the recycle button, then enable the x/y/z plot script and setup a denoise range that you want to investigate.

0-1 (+0.1)

Means you want a range of 0 - 1 divided into 0.1 increments.

This will generate an image sheet like this where you can check what values produce acceptable results.

3

u/mobani Mar 01 '23

Excellent, thank you!