The Complete Guide on Ultimate SD Upscale

author - Brenda Peng
Brenda Peng

Updated on

In this blog, we will be covering all the details you need to install and use the ultimate SD upscale script. This script has upscaling algorithms such as R-ESRGAN and SwinIR_4 built-in. We will also guide you through steps to download the 4x-UltraSharp algorithm for the Ultimate SD Upscale script.

Ultimated Upscale Alters Image

Please note that here is one innate drawback of ultimate SD upscale… In the comparison above, you can see how the ultimate upscale 4X image alters some content from the source file. Notably, the girl's facial features—lips, nose, and eyes—as well as the snow in the background, appear slightly different in the upscaled version. While ControlNet can help reduce these discrepancies, it's not a complete solution.

Therefore, before we dive into the detailed steps for using the Ultimate Upscale script, here is another AI upscaler that combines the benefits of Ultimate Upscale while minimizing its drawbacks.

Meet Aiarty Image Enhancer developed by Digiarty Software. Inc, a standalone image upscaler powered by AI for 8K/16K/32K huge size upscaling. It is low-vram friendly, and has More-detail Model built in.

AI Arty Image Enhancer Upscale Stable Diffusion AI Art

Aiarty Image Enhancer – Best Companion for Stable Diffusion

  • Huge resolution supported: 8X/16X and higher upscaling with realistic details.
  • Faster process even on an old PC: Upscale 100 pictures in 2 minutes.
  • Tailored models to upscale AI images, photos, anime, and restore compressed pics.
  • Batch tasks easily to streamline your workflow.

You can integrate Aiarty Image Enhancer into your Stable Diffusion workflow. Either use it as the only upscaler for the entire process, or use it before or after other upscaling models.

It supports batch tasks, so that you don't need to manually set up each image, and spending hours on the upscaling workflow.

Aiarty Upscale Image with Details

Simply import all the images > select the More-Detail Model > Set Resolution, and hit Run to export all the images.

Watch Aiarty Image Enhancer in action:

🎬 Timestamp
00:35 Part 1. Why use Aiarty to enhance your Stable Diffusion workflow
01:10 Part 2. Image upscaling with the More-Detail Model
02:30 Part 3. Image upscaling with the Smooth Diff Model

1. How to Install Ultimate Upscale Script for Stable Diffusion

Assuming you have followed the detailed steps here to install Stable Diffusion on your computer, now here are steps to install the Ultimate Upscale Script.

Step 1. Go to the Extensions tab > Available > Load from.

Step 2. Find "Ultimated SD upscale" script and hit Install.

Alternatively, you can also install from URL:

Install From URL the Script

Extensions tab > Install from URL > Paste the script's Git repository URL as follow:

SD WebUI Install Restart UI

Note: To complete the installation, please restart the WebUI. In the 'Installed' tab, ensure 'ultimate-upscale-for-automatic1111' is selected, then click 'Apply and Restart UI'.

2. How to Use Ultimate Upscale Script in Stable Diffusion

Step 1. Launch up the Stable Diffusion automatic a1111 WebUI, and go to the img2img tab.

Send the images generated in txt2img to img2img, or you can drag and drop local images into the img2img working area.

Step 2. Scroll down to the script section.

Hit the drop-down menu and select Ultimate SD upscale.

Ultimate SD Upscale Stable Diffusion UI

Step 3. For the Target size type option, choose Scale from image size.

Step 4. For the Upscaler option, select an upscaling algorithm suitable for your current needs.

You can refer to the detailed explanation of each upscaler below.

Some of which work for general purposes, while others target a specific image type, such as anime only or realistic photo only.

Step 5. Set the scale value.

2 means upscale by 2 times. It is suggested that we go with 2 for the first time. You can check how your hardware handles the upscaling. Then decide if you want to go higher. 4 times or higher may result in loss of details or straining your system's resources.

Step 6. Leave Seams Fix at the default value.

For a detailed explanation of ultimate sd upscale parameters, visit the wiki page created by its developer.

Step 7. Tweak img2img settings.

  • For the Sampling method, the no brainer choice is Euler. You can also read our complete guide on Stable Diffusion sampling methods.
  • For the Sampling steps, I prefer to set it from 16 to 20. After seeing the result, I may experiment with different settings to see what works best depending on different images.
  • For Denoising strength, I usually go with 0.05-0.07. Since the aim here is upscaling, instead of recreating. A lower denoising strength ensures the output image stays closer to the original.
  • For the CFG scale, set it to 7 for a good starting point. You can experiment with values around it to better understand how it works. The CFG value determines how much the AI model adheres to the specific prompts or instructions given.

Bonus: Detailed Explanation on Upscaling Algorithms/Models

SD Upscaling Algorithms Comparison

Here's a breakdown of common upscaling algorithms and their key characteristics:

Lanczos is primarily used in image resizing, providing high-quality results by minimizing aliasing and preserving detail, making it a popular choice for upscaling images.

Latent is based on Variational Autoencoders (VAE). It encodes the original image into a latent vector, which is then randomly sampled and reconstructed to improve the image's quality, contrast, and clarity. While it generally produces acceptable results with lower memory consumption compared to other methods like 4x-UltraSharp or R-ESRGAN, its output quality isn't always the best.

ESRGAN (Enhanced Super-Resolution Generative Adversarial Network) is designed to upscale with of more realistic textures. However, it can occasionally produce images with jagged edges or strange textures, depending on the input image type.

ESRGAN 4x aims to refine the detail in upscaled images while maintaining realistic visual quality.

R-ESRGAN 4x+ is an optimized variant of Real ESRGAN. It fine-tunes the model for photos, providing enhanced clarity and detail that appeals to photographers.

R-ESRGAN 4x Anime6 is also based on Real ESRGAN. As the name suggests, it's optimized to improve the quality of anime visuals.

R-ESRGAN General 4xV, this model is lightweight and fast but delivers less impressive results compared to its counterparts. It's suitable for situations where computational efficiency is prioritized over output quality.

LDSR effectively reconstructs high-resolution images from low-resolution inputs, merging traditional image processing with advanced diffusion techniques.

4x-UltraSharp is an optimized model built on ESRGAN, specifically designed for common image formats. It excels in enhancing images of real people, making it an excellent choice for photographs where natural detail is crucial.

SwinIR_4 employs the Swin Transformer architecture, utilizing long-range connections to directly pass low-frequency information to the reconstruction module. This approach enhances the model's focus on high-frequency details, contributing to a more stable training process and better feature extraction.

Note: The ultimate upscale script also includes the following algorithms to enhance image quality.

ScuNET GAN is short for Swin-Conv-UNet. It helps you to remove unwanted noise from images, ensuring that the important details remain clear and sharp.

Tips: How to Install 4x-UltraSharp Algorithm for Ultimate Upscale Script

Since the 4x-UltraSharp upscaler is not baked into the Ultimate Upscale script, you need to download it separately. Follow the steps below.

Install Stable Diffusion Models ESRGAN 4x Ultrasharp

Step 1. Download 4x-UltraSharp upscaler from Huggingface site here.

https://huggingface.co/lokCX/4x-Ultrasharp/blob/main/4x-UltraSharp.pth

Step 2. Place the file in the upscaling models folder as shown below:

[Your stable-diffusion-webui folder]\models\ESRGAN\

Step 3. Relaunch the Stable Diffusion automatic a1111, and you shall be able to find 4x-UltraSharp now.

3. Troubleshooting Ultimate Upscale Errors

1. How to resolve runtime error as follows?

"RuntimeError: Given groups=1, weight of size [64, 3, 3, 3], expected input[1, 4, 256, 256] to have 3 channels, but got 4 channels instead error"

Set Upscaler to None in SD Settings

You can try change the upscaler setting to none. To do so, go to settings > Upscaling > Upscaler for img2img, and select None from the drop-down menu, as shown below.

2. How to avoid image distortion upon upscaling?

You can use Ultimate Upscale with ControlNet. For detailed steps, watch the YouTube video tutorial below. Still, there can be a few variations that innate of this method. If you want to upscale image to 8K/16K and higher without altering image and keep realistic details, please refer to the Aiarty upscaling method above.

Brenda Peng is a seasoned editor at Digiarty Software who loves turning ordinary photos into extraordinary works of art. With years of experience behind the lens and in front of the computer, Brenda shares her passion for photography, image enhancement, and editing through easy-to-follow tutorials.

Home > Upscale Image > AI Upscale Stable Diffusion Images