Base & upscale

Upscale by

Final size

Width × Height
Effective scale
Base megapixels
Final megapixels
Pixel-count ×

Sides are rounded to the latent step (multiple of 8), so the final size matches what Stable Diffusion actually generates.

A calculator that instantly gives you the final width × height for Stable Diffusion's hires fix (high-res fix) or an upscaler: base resolution × upscale factor = final size. Enter your generation base size (for example SDXL's 1024×1024) and the "Upscale by" factor (1.5×, 2×, and so on) and it shows the final resolution right away. There's also a reverse mode: type the target size you want — say 4K with a 2160px long side — and it works out the scale factor you need. Because Stable Diffusion works in a latent space downscaled 8× from the image, the sides that actually get generated are rounded to multiples of 8, so this tool rounds the final resolution to a multiple of 8 by default and what you see matches what you'll generate (you can switch rounding to 1px to see the raw value). It also shows the base and final megapixels and the ratio between them. Total pixels grow with the square of the scale (doubling the scale quadruples the area), so this is a useful guide to how much VRAM and time the upscale will cost. It's pure calculation with no external API or data, so nothing is ever sent anywhere — everything runs locally in your browser.

How to use

  1. Enter your base resolution (pick SDXL / SD 1.5 from the presets, or type width and height directly).
  2. In "By scale" mode pick or type the Upscale by factor, or switch to "By target size" and type the long side you want in px.
  3. Read off the final "Width × Height" and megapixels, then copy it into your generator's hires fix / upscale settings.

FAQ

Is anything I enter sent to a server?

No. The math runs entirely in your browser, with no external API or data. The base resolution, scale, and target size you enter are never uploaded, stored, or sent anywhere — they are processed only on your device.

Why is the final resolution rounded to a multiple of 8?

Stable Diffusion works in a latent space downscaled 8× from the image, so the sides that actually get generated are rounded to multiples of 8. This tool rounds the same way by default so the displayed size matches what you'll generate. Switch rounding to 1 if you want to see the raw multiplied value.

Can it work backwards from a target size?

Yes. Switch to "By target size" mode and type the final long side you want (for example 2160 for 4K). The tool shows the scale factor needed relative to your base resolution, along with the rounded final width × height.

How much heavier does a bigger scale make generation?

Total pixels grow with the square of the scale. Doubling the scale doubles both width and height, so the area (pixel count) becomes 4× — and VRAM use and generation time roughly scale with that. The tool shows base and final megapixels and the ratio so you can gauge the cost.

What's the difference between hires fix and an upscaler?

The math — final resolution = base × scale — is the same for both. Hires fix enlarges and re-renders during generation, while a post upscaler (such as ESRGAN) enlarges the finished image. Either way, the final width × height this tool gives you plugs straight into those settings.

Why not just generate at the large size from the start?

SD/SDXL tends to break composition and duplicate subjects when you stray far from its trained native resolution. The usual approach is to generate near native, then enlarge with hires fix or an upscaler. You can find a base model's native size with the sister resolution calculator.