How to use HiRes.fix to upscale your Stable Diffusion images in A1111

Shyanne Barretto
RenderNet.ai
Published in
4 min readNov 23, 2023

Stable Diffusion’s most popular webui, Automatic1111, is chock-full of features and extensions that can help turn your wildest imagination into reality. And among all these options, one that goes under-appreciated and rather underused is HiRes.fix.

Before we get into that, let’s talk a little about creating high-resolution images in Stable Diffusion. You would think that all you have to do is enter your target width and height, i.e., if you want to make a wallpaper, just select a 1920 x 1080 resolution and you’re good to go. But this isn’t how SD works. Stable Diffusion models based on SD 1.5 are trained primarily on smaller images, so choosing higher resolutions creates a lot of absurdities. Models based on SDXL are better at creating higher resolutions, but they too have a limit. So what then?

Enter HiRes.fix: a simple way to upscale your images while they’re being generated. Instead of first generating an image and then upscaling it through A1111’s img2img or extras options, you can use HiRes.fix to increase resolution during the generation process. Not only does this ensure that no artifacts or irregularities are introduced in the image, but it also improves the quality of the picture itself.

Image generation settings in Stable Diffusion Automatic1111

Let’s go through the settings for HiRes.fix and see how it works. And soon you’ll be able to make some stellar Stable Diffusion images using Automatic1111.

Upscaling using HiRes.fix

The first thing you need to set is your target resolution. By default A1111 sets the width and height at 512 x 512. When you open HiRes.fix, you’ll see that it’s set to ‘Upscale by 2’, which means that you’ll finally get a 1024x1024 image. You can upscale it by a max factor of 4x, or you can resize the width and heigh individually (not recommended). Just remember, the more you upscale, the longer it’ll take to generate your image.

Upscaler

HiRes.fix allows you to choose from among numerous upscalers in a drop-down. The upscaler you choose dictates the process by which the image is, well, upscaled. Each option offers something unique and too find the ideal one will take a bit of experimentation.

Upscaler options available in Automatic1111

That being said, we’ve found that the Latent upscaler is a good general purpose option, while the R-ESRGAN 4x+ and R-ESRGAN 4x+ Anime6B work really well for photorealistic and animated/cartoon images respectively.

HiRes Steps: Post-Sampling Brilliance

HiRes steps refine image quality after initial sampling. They are the upscaling steps that occur after the sampling steps. Total steps are sampling steps + HiRes steps.

You can set HiRes steps in the range 0–150. Keeping it at 0 makes HiRes steps = Sampling steps. So if you’re sampling steps are 20 and your HiRes steps are 0, the total steps are 40. Selecting the right number of HiRes steps is important, because setting it either too low or too high tends to worsen the image results. We’ve found that opting for 10–15 HiRes steps tends to yield the best results. However, if your sampling steps exceed 50, then it’s a good idea to set HiRes steps at the half the number of sampling steps.

Denoising: The Image Cleanup Crew

The final HiRes.fix setting left is the Denoising Strength. This essentially sets how strongly the upscaler effects image generation. Setting denoising to 0 will have no effect on the image, and setting it to 1 tends to change the image quite a lot.

A1111 has the denoising strength to 0.7 by default. However, this tends to be too strong in a lot of cases. You’ll have to do a bit of experimentation to find the ideal denoising strength without changing too much of your image. Start by using values between 0.3–0.5 and then move it higher and lower based on your results.

And that’s all you need to know about HiRes.fix. You should know that RenderNet.ai applies HiRes.fix to all image generations and, unlike every other Stable Diffusion-based image generation site, RenderNet does not charge any extra credits for creating upscaled images! If you want to see HiRes.fix at work for yourself, head over to rendernet.ai and just sign in to get 50 free image generations, all upscaled by default.

--

--