Nodes/comfyui-hires/GigaHires Latent Upscale
ComfyUI Node

GigaHires Latent Upscale

The fast, blocky-looking step (that's fine)

By Enferlain·Created 4 months ago·Updated 4 months ago· 0
GigaHires Latent Upscale
  • latent
  • vae
  • upscaled_latent
  • debug_info
latent_modeLatent (antialiased)
sizing_modescale
scale_by2.00
target_width0
target_height0

Upscaling in latent space is fast, free, and looks rough as hell until the second pass cleans it up. This node does the rough part properly: it resizes your latent with a real interpolation mode and exact sizing controls, so it can feed a visible refine stage. If you've ever built a hires-fix graph with stock LatentUpscale and wished you could just type a target size, this is that wish granted.

How it works

It needs the vae input for one reason only: to learn the VAE's spatial compression factor (8 for SD1.5 and SDXL), which is how it converts a pixel target size into a latent size. It reads your latent's shape, multiplies by that compression to get the base image size, resolves the target from sizing_mode, snaps it to a compression multiple so the latent dims stay valid, and interpolates.

latent_mode is the interesting dropdown, with six options that map onto interpolation modes:

  • Latent (antialiased) (default) - bilinear with antialiasing. This is the one to keep.
  • Latent (bicubic) / Latent (bicubic antialiased) - slightly different filter, still smooth.
  • Latent (nearest) / Latent (nearest-exact) - the blocky ones. Fine for a deliberate pixel look, wrong for hires fix.

A useful finding from the pack's own testing notes: even bicubic antialiased can look blocky at low denoise, so don't go down an interpolation rabbit hole - that's a latent-branch property, not a bug in your mode choice.

The inputs that matter

  • scale_by (default 2) for the scale sizing mode, or target_width / target_height for exact pixels. In target mode, set one dimension to 0 and it preserves the aspect ratio.
  • latent_mode - the antialiased default; change it only if you know why.

Outputs: upscaled_latent (feed it straight into GigaHires Refine Pass) and debug_info, which tells you the base vs resolved size and the latent shape after upscaling. Handy for checking you didn't accidentally blow past your VRAM budget before the refine pass.

Where it fits

This is the first stage of the pack's latent hires branch: first KSamplerGigaHires Latent UpscaleGigaHires Refine Pass. It's the right path when the upscale is moderate, preserving composition matters, and you'd rather not pay for a decode → model-upscale → re-encode round trip. The author's notes give a sane starting range: antialiased mode, 10–12 refine steps, 0.30–0.40 denoise downstream.

The alternative branch is GigaHires Image Upscale (decode, learned upscaler, re-encode), and the author's guidance is to switch to it when the target gets large or the latent path still looks blocky after refinement. Neither more steps nor endless interpolation tweaks reliably fix latent blockiness - they tested both - the branch switch does.

Where people get burned

  • Judging the result at this node. The upscaled latent preview will look soft or chunky. That's normal; the refine pass is what resolves it. Preview early, panic late.
  • Wondering why vae is required. You never see it "do" anything, but it's load-bearing - without the compression factor the pixel↔latent size math breaks. It's a required input, not optional.
  • Nearest modes for hires fix. They guarantee blockiness and are the wrong tool unless you're chasing a pixel-art effect.

Install

Manager → search "comfyui-hires", or:

cd ComfyUI/custom_nodes
git clone https://github.com/Enferlain/comfyui-hires

Restart ComfyUI. No pip dependencies at all - the pack uses only ComfyUI's own internals plus the newer native extension API, so an up-to-date ComfyUI is the one real requirement. Old builds won't register the node.

Categorysampling/upscale

Inputs (7)

NameTypeDefaultDescription
latentLATENT
vaeVAE
latent_modeCOMBOLatent (antialiased)6 options: Latent, Latent (antialiased), Latent (bicubic), Latent (bicubic antialiased), Latent (nearest), Latent (nearest-exact)
sizing_modeCOMBOscale2 options: scale, target
scale_byFLOAT2.000.1–8
target_widthINT00–16384
target_heightINT00–16384

Outputs (2)

NameTypeDescription
upscaled_latentLATENT
debug_infoSTRING