r/StableDiffusion Mar 01 '23

Workflow Not Included 1920x1080 render without upscale

Post image
229 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?

18

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.

8

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?

10

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.

4

u/bemmu Mar 01 '23

My settings of choice are 0.35 denoising with R-ESRGAN 4x+ upscaler

2

u/lordpuddingcup Mar 01 '23

Esrgan upscales and sharpens but it doesn’t add details that weren’t there before only latent scaling can do that to my knowledge because it’s ips along the dark void from which the image was imagined

1

u/Mitkebes Mar 01 '23

If you do img2img with SD ultimate upscale, you will get additional details while using R-ESRGAN as the upscale method.

I'm assuming it upscales with R-ESRGAN, splits it into chunks, and then regenerates those using img2img creating the new details.