SD Hires.fix Resolution Calculator

Calculate base and upscaled resolutions for the SD hires.fix workflow

Enter a target output resolution and upscale factor and this calculator works out the correct base generation resolution to feed into Stable Diffusion hires.fix, with a rough VRAM estimate per model so you avoid out-of-memory errors. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is hires.fix?

Hires.fix is a two-pass Stable Diffusion workflow. The model first generates at a low base resolution it was trained on, then upscales and runs a second img2img pass to add detail. It produces sharper large images than generating at high resolution directly.

Get the base resolution for hires.fix right

Hires.fix gives Stable Diffusion images their crisp, high-resolution look — but only if the base resolution of the first pass lands in the model’s trained sweet spot. Set it too high and you get duplicated heads and warped bodies; too low and the upscale looks soft. This calculator takes the final size you want and an upscale factor and tells you exactly what base resolution to generate at, plus a VRAM sanity check.

How the hires.fix math works

Hires.fix is a two-pass pipeline:

  1. Base pass — generate at a resolution close to the model’s native size (≈512px for SD 1.5, ≈1024px for SDXL).
  2. Upscale + refine — multiply by the upscale factor and run a short img2img pass to paint in detail.

So the relationship is simply:

base_width  = target_width  / upscale_factor
base_height = target_height / upscale_factor

The trick is choosing an upscale factor that lands the base size near the model’s native resolution. If you want 2048×2048 from SDXL, a 2× factor gives a 1024×1024 base — perfect. The same target on SD 1.5 would want a ~3× factor to keep the base near 680px.

Tips to avoid out-of-memory and artifacts

  • Stay near native. Keep the base long edge within roughly ±50% of the model’s native resolution.
  • Watch VRAM on the second pass. The upscaled pass operates at full target resolution — that is where most cards run out of memory. Enable tiled VAE if the estimate is tight.
  • Use a low hires denoising. 0.3–0.5 adds detail without changing the composition the base pass established.
  • Multiples of 8. Both base and target dimensions should be divisible by 8; the calculator rounds for you.

Here are a few popular output sizes with the recommended upscale factors for each model:

SD 1.5 (native ~512px)

Target resolutionUpscale factorBase size
768 × 7681.5×512 × 512
1024 × 1024512 × 512
1536 × 1024768 × 512
1920 × 1080960 × 540 (slightly above native)

For SD 1.5 targets much above 1280px, a 2.5× or 3× upscale factor is often safer to keep the base near 512px.

SDXL (native ~1024px)

Target resolutionUpscale factorBase size
1280 × 12801.25×1024 × 1024
1536 × 15361.5×1024 × 1024
2048 × 20481024 × 1024
2560 × 14401280 × 720 (within SDXL range)

Understanding the denoising strength setting

The hires denoising strength (also called hires steps’ denoising in Automatic1111) is separate from the main generation’s denoising and controls how much the upscaling pass is allowed to change the image:

  • 0.3 or lower — very light touch; adds texture and sharpens detail without moving lines or changing composition. Safe choice for portraits.
  • 0.4–0.5 — moderate refinement; the upscaled pass redraws some areas for better detail but the overall composition is stable.
  • 0.6–0.7 — stronger refinement; can fix some artifacts from the base pass but risks introducing new composition shifts or inconsistencies.
  • 0.8+ — almost a full redraw; often causes the final image to diverge significantly from the base pass. Usually not the intent of hires.fix.

For most outputs, a denoising strength of 0.4–0.5 gives the best balance of sharpness and stability.