Learn ComfyUI Image Generation: FLUX, ControlNet, and LoRA Upscaling and Detail Refinement

Upscaling and Detail Refinement

Intermediate 🕐 15 min Lesson 7 of 11
What you'll learn
  • Add Load Upscale Model and Upscale Image With Model nodes to a workflow to increase image resolution.
  • Download and place 4x-UltraSharp in the correct ComfyUI folder.
  • Build a three-stage pipeline: generate at base resolution, model upscale, then detail-pass with KSampler.

Why Upscale in ComfyUI Instead of Elsewhere

AI upscaling models understand image content differently from traditional bicubic or Lanczos interpolation. They add plausible detail — fine texture, hair strands, surface grain — rather than simply stretching pixels. The best results come from running upscaling inside ComfyUI, where you can chain it directly with a detail-enhancement pass that uses the diffusion model to add even more high-frequency detail at the larger resolution.

Two approaches exist in ComfyUI, and the best pipeline uses both:

  • Model upscaling: runs an upscale network (like 4x-UltraSharp) on the image. Fast, reliable, minimal artifacts. Takes a 512px image to 2048px in seconds.
  • Latent upscaling with a detail pass: upscales the latent space and runs another KSampler pass at low denoise to add diffusion-generated detail. Slower but produces sharper, more detailed output at large sizes.

Model Upscaling: Load Upscale Model and Upscale Image With Model

To add model upscaling to any workflow after your VAE Decode step:

  1. Add a Load Upscale Model node. Select your upscale model from the dropdown — the model files live in ComfyUI/models/upscale_models/.
  2. Add an Upscale Image With Model node. Connect: Load Upscale Model → upscale_model input; VAE Decode output → image input.
  3. The output IMAGE is now 4x the original resolution. Connect it to a Save Image node.

That's the complete model upscaling workflow. No other nodes needed.

Upscale Model Files and Where to Put Them

Download upscale models as .pth files and place them in ComfyUI/models/upscale_models/. Recommended models:

  • 4x-UltraSharp: the most popular choice for photorealistic images and digital art. Adds strong detail, especially edges and fine textures. Download from CivitAI (search "4x UltraSharp"). This is the best default choice.
  • 4x-ESRGAN: general purpose, slightly smoother output. Good for images where 4x-UltraSharp's sharpening is too aggressive.
  • 4x-AnimeSharp: optimized for anime and illustration styles. Preserves clean lines without over-sharpening gradients.
  • 8x_NMKD-Superscale: 8x upscale in one pass; useful for very small base images.

After downloading, restart ComfyUI or right-click the Load Upscale Model node and select "Refresh" to see the new files in the dropdown.

Adding a Detail Pass After Upscaling

A model upscale at 4x looks significantly better than bicubic, but a detail pass pushes it further. After upscaling, feed the enlarged image back through VAE Encode → KSampler (denoise 0.3–0.45) → VAE Decode → Save Image. This low-denoise pass runs the diffusion model on the already-upscaled image, adding fine-grained detail that the upscale network alone couldn't generate.

Use the same positive prompt as the original generation so the detail pass stays consistent with your intent. Set denoise no higher than 0.45 — higher values start changing the image in ways you didn't intend rather than just adding detail.

For very large outputs (4096px and above), enable tiled VAE decoding in ComfyUI's settings to avoid VRAM exhaustion during the detail pass. Tiling encodes and decodes the image in blocks rather than all at once.

The Recommended Three-Stage Pipeline

For the best output at the highest quality:

  1. Generate at base resolution (512px for SD 1.5, 1024px for SDXL/FLUX). This is where you get the composition right. Check it before investing time in upscaling.
  2. Model upscale 4x with Load Upscale Model + Upscale Image With Model using 4x-UltraSharp. Your 512px image is now 2048px.
  3. Detail pass via VAE Encode → KSampler (denoise 0.35, same prompt, same model) → VAE Decode → Save Image. The final output has AI-generated fine detail at full resolution.

This three-stage approach separates concerns: Stage 1 gets composition right at low cost, Stage 2 increases resolution quickly, Stage 3 adds detail efficiently at the larger size. Any stage can be skipped if you don't need that level of quality.

Key takeaways
  • Model upscaling uses two nodes: Load Upscale Model (loads the .pth file from models/upscale_models/) and Upscale Image With Model (runs the upscaler on your image) — both nodes connect after VAE Decode.
  • 4x-UltraSharp is the standard first choice for photorealistic and digital art upscaling — download the .pth file from CivitAI and place it in ComfyUI/models/upscale_models/.
  • A detail pass after upscaling runs the diffusion model at denoise 0.3–0.45 on the enlarged image to add fine-grained texture that the upscale network cannot generate on its own.
  • Enable tiled VAE in ComfyUI settings when processing images above 3000px to avoid VRAM exhaustion — tiling encodes and decodes in blocks rather than loading the entire image at once.
  • The three-stage pipeline (generate at base res, model upscale 4x, low-denoise detail pass) produces better results than trying to generate at full resolution from the start because each stage has a focused job.