Jarvislabs.ai

Upscale

Upscale Image using Automatic1111

I always dreamt to gift my mom a high quality photo of her favorite old photo. I tried to upscale it using photoshop but it didn't work. I was able to recently find a way to upscale it using Automatic1111. Lets explore how we can upscale low resolution images to high resolution images using Automatic1111.

Before we jump into the work, Make sure you have all the below things ready ⬇

  • Have a instance in JarvisLabs. If not then follow this JarvisLabs docs
  • Get a low resolution image.

I'm assuming that you're at this page.

A1111

Click Extras

You will see a page something like this below

extras

Upload your picture, I used the below settings to upscale my image.

Scale By: 2

Upscaler 1 : Choose R-ESRGAN 4x+ for upscaler 1.
Enhanced Super-Resolution Generative Adversarial Networks (ESRGAN) is mostly used one.
 We will learn it why it is mostly used later on this Documentation.

Upscaler 2: Optional(choose None).

GFPGAN visibility: set at 1 (max).

CodeFormer visibility: set at 0.8.

CodeFormer weight:  set at 1(minimum effect)

Click generate button and wait for a few minutes to see a high resolution image.

Here is a example

JI75u94.md.avif

I upscaled Logan paul image, Look at the difference between the two just wow. Now Learn more about the Upscaler.

What is upscalers ?

The upscaler provides an option to select the type of model used for enhancing image quality. It includes default models such as

  • ESRGAN
  • Nearest
  • SwinIR

ESRGAN

Enhanced Super-Resolution Generative Adversarial Networks (ESRGAN) is neural networks algorithm. Super Resolution ResNet-based architecture with residual-in-residual blocks. Basically it splits the low resolution (LR) image into several block and processes the block to higher resolution (HR) image multiple times. It was trained using millions of LR images to prevent disfigured HR images.

let's see a example between R-ESRGAN 4x+ and SwinIR 4x

JI7jjzF.md.avif

The two image may look similar but if you look closely you can see that the right one has something wrong with the eyes and the it also slightly saturated. Maybe SwinIR 4x will be perfect for some scenario. Always explore and feel free to change the model or install any new model.

Combine two Upscalers

In Automatic1111, We can combine two Upscalers to make more high quality image. If we combine two R-ESRGAN 4x+, It will result as more depth to the picture.

Upscaler 2

You can choose any models for upscaler 2 depending on your requirement. I prefer to choose Lanczos to get more accurate pixel boundaries.

Upscaler 2 visibility

JI75u94.md.avif Use the slider to control how much upscaler 2 model to upscale your image.

Hopefully you got your high resolution image, if not feel free to tweak the settings. What better way to learn than hacking 😊

References

ESRGAN official site.

GFPGAN check it out to learn about it.

CODEFORMERS learn more about codeformers.

Next
LoRa