What Resolution Should You Aim For?

Illustration of a supercar speeding down a highway at night.png (1024×1024)
  • Choose a target resolution based on your device (Full HD, iPad, iPad Air, etc.)
  • Select the upscaler based on the type of image you are working with
  • High resolution ≠ natural image (especially for faces)

Introduction

Hello, this is Easygoing.

Today, we’ll be discussing optimal resolution when using AI for image generation.

Supercar driving on a highway 512.png (512×512)
Resolution: 512 x 512
High-resolution supercar on a highway.png (1024×1024)
Resolution: 1024 x 1024

Current Device Display Trends

Higher resolutions mean sharper images, but what resolution should we actually aim for?

Let’s first look at the most common device resolutions in Japan.

iPhone

Model Screen Size (inches) Long Side Short Side PPI
iPhone 15 6.1 2556 1179 461
iPhone SE (2022) 4.7 1334 750 326

Android

Model Screen Size (inches) Long Side Short Side PPI
Pixel 8a 6.1 2400 1080 430
Aquos Sense 8 6.1 2340 1080 422
Xperia 10 VI 6.1 2520 1080 449
Galaxy A55 6.6 2340 1080 390

Tablets

Model Screen Size (inches) Long Side Short Side PPI
iPad Pro (2024) 13 2752 2064 264
iPad Air (2024) 13 2732 2048 264
iPad (2022) 10.9 2360 1640 264

PC Monitors

Resolution Long Side Short Side Market Share (%)
Full HD 1920 1080 27%
WQHD 2560 1440 4.3%
4K 3840 2160 0.61%

Which is Target ?

PPI (Pixels Per Inch) refers to the pixel density of the display.

The human eye can only distinguish up to around 300 PPI, meaning that the highest resolutions on smartphones are beyond what we can visually perceive.

Therefore, it’s best to aim for tablet and PC resolutions.

The Resolution Breakpoint to Aim For

So, what resolution should we aim for in practical use?

Here are the breakpoints for achieving full-screen images:

  • Full HD: 1920 pixels (long side)
  • iPad: 2360 pixels (long side)
  • iPad Air: 2732 pixels (long side)

The maximum resolution you can aim for will depend on your GPU’s capabilities and file size limitations.

For my setup, I aim for the iPad resolution of 2360 pixels, based on my GPU’s performance.

Stable Diffusion XL’s Recommended Resolution: 1024 x 1024

Stable Diffusion XL is trained on images with a resolution of 1024 x 1024.

Supercar concept art.png (1024×1024)

As a result, generating images at this resolution ensures stability.

When altering aspect ratios, here are the recommended resolutions for Stable Diffusion:

Landscape

  • 4:3 – 1152 x 896
  • 7:5 – 1184 x 832
  • 8:5 – 1248 x 768
  • 16:9 – 1344 x 768

Portrait

  • 5:7 – 832 x 1184
  • 2:3 – 832 x 1216
  • 5:8 – 768 x 1248

Check out our previous post for examples of these aspect ratios:

What Happens If You Exceed the Recommended Resolution?

You can generate images with resolutions higher than Stable Diffusion XL’s recommendation, but beware of potential issues.

At higher resolutions, you may notice artifacts such as duplicated elements or fused limbs, especially when the short side exceeds 1024 pixels.

Supercar fusion error.png (2480×1280)

Therefore, I recommend generating images at the recommended resolution first and then upscaling.

AI Image Generation Excels at Upscaling

In the past, mathematical methods like Lanzhos were used for image upscaling, but these often resulted in blurry images.

With AI image generation, noise reduction is applied after the image is upscaled, resulting in sharper images without the blur.

High-resolution supercar concept art.png (2280×1176)

Use High-Resolution Assistance

When performing high-resolution upscaling, you can use image-to-image in Stable Diffusion after generating an initial image.

While this typically requires two steps, Stable Diffusion has a built-in tool called Hires.fix, which automates the process.

How to Use Hires.fix

With Hires.fix, you can easily upscale by specifying a scaling factor.

Hires.fix Settings.png (914×330)

In this case, the target long side is 2400, so the scale factor is set to 1.65.

After specifying the scale factor, the output resolution will appear at the top right. For most other settings, the default options are fine.

If you want more control over the upscaling process, you can adjust additional settings.

Types of Upscalers and Their Features

There are various upscalers available for high-resolution processing. Here are my recommended options based on my experiences:

Original image of a woman in a wheat field.png (1024×1024)
Original Image: 1024 x 1024

R-ESRGAN 4x+ Anime6B

High-res Woman in Wheat Field – Anime6B.png (2048×2048)
R-ESRGAN 4x+ Anime6B: 2048 x 2048

This upscaler is tailored for anime-style images, enhancing line art and illustrations with bold colors and sharp shadows.

4x-Ultrasharp

High-res Woman in Wheat Field – Ultrasharp.png (2048×2048)
4x-Ultrasharp: 2048 x 2048

Primarily used for photorealistic images, but it can also be applied to anime-style art. This is a great option if you want a sharper result.

4x_NMKD-Superscale-SP_178000_G

High-res Woman in Wheat Field – Superscale.png (2048×2048)
4x_NMKD-Superscale-SP_178000_G: 2048 x 2048

This is another upscaler geared toward photorealism. Compared to 4x-Ultrasharp, it has a more natural look but can appear slightly flatter.

4x-SwinIR-M_Pretrain

High-res Woman in Wheat Field – SwinIR.png (2048×2048)
4x-SwinIR-M_Pretrain: 2048 x 2048

Also designed for photorealistic images, this upscaler provides the softest, most natural appearance among the ones I’ve tested.

All images are beautiful

To be honest, all of these upscalers produce beautiful results when upscaling. Choosing the right one ultimately comes down to personal preference.

Except for R-ESRGAN 4x+ Anime6B, these upscalers are not included by default in Stable Diffusion webUI and need to be downloaded separately. I’ve provided the download links below.

Too Perfect Faces…

While the upscalers create sharp and clean images, there’s something that doesn’t sit right.

After some thought, I realized it’s probably because the faces are too perfect.

The facial features and proportions are too flawless, which can sometimes create an uncanny effect. This is a significant issue in AI image generation, and I’ll explore possible solutions in the next post.

Conclusion: Find the Optimal Resolution

To summarize:

  • Choose a target resolution based on your device (Full HD, iPad, iPad Air, etc.)
  • Select the upscaler based on the type of image you are working with
  • High resolution ≠ natural image (especially for faces)

AI-assisted upscaling is groundbreaking and allows for much sharper images than ever before.

In the near future, I believe browsers on smartphones and tablets will have built-in AI to upscale images as you browse the web.

Next time, I’ll dive deeper into the issue of faces being “too perfect.” Stay tuned!


Upscaler Download Links

4x-Ultrasharp

4x_NMKD-Superscale-SP_178000_G

4x-SwinIR-M_Pretrain


Original Article (Japanese)