Nodes/comfyui-hires/GigaHires Image Upscale
ComfyUI Node

GigaHires Image Upscale

One node instead of three

By Enferlain·Created 4 months ago·Updated 4 months ago· 0
GigaHires Image Upscale
  • image
  • upscale_model
  • upscaled_image
  • debug_info
methodupscale_model
sizing_modescale
scale_by2.00
target_width0
target_height0
upscale_model_nameNone

The stock Comfy way to upscale with a learned model is three nodes in a row: UpscaleModelLoaderImageUpscaleWithModel → some resize you have to get right yourself. This node is that whole chain in one box, with a scale_by slider and exact target sizes on top. It's the "image upscaler branch" of the GigaHires pack, and honestly it's the easiest part of the pack to use on its own - wire in any image and a model name and you're done.

What it actually does

It upscales an IMAGE one of two ways, chosen by method:

  • upscale_model (default) - runs a learned upscaler (any ESRGAN-family .pt/.safetensors sitting in models/upscale_models, so 4x-UltraSharp, Remacri, RealESRGAN and friends all work) then Lanczos-resizes to the exact target.
  • lanczos - plain interpolation, no model, no hallucination risk. The cheap rung of the upscaling ladder in KB terms: it adds pixels, nothing else.

Sizing works like the rest of the pack. sizing_mode = scale multiplies the base size by scale_by (default 2). sizing_mode = target goes to an exact target_width / target_height; set one of them to 0 and it preserves the aspect ratio. One difference from the latent-side nodes: this one resolves to exact pixel sizes with no rounding - the latent upscaler snaps to the VAE's compression multiple (8 for SD1.5 and SDXL), so if you're feeding this output into a VAEEncode, keeping your target dims on an 8 boundary is on you.

One smart detail from the source: if method = upscale_model but the target is smaller than the source, it skips the model entirely - running a 4x model just to downscale is pointless. The debug output shows <skipped-downscale> when that happens.

The inputs that matter

  • method - upscale_model or lanczos. Start with the model unless you only want pixels.
  • scale_by or target_width/target_height - pick one sizing mode and stick to it.
  • upscale_model_name + the optional upscale_model input - you can pick from the dropdown or wire a model in directly. An input wins over the dropdown if both are set.

Where people get burned

The dropdown defaults to "None". If method = upscale_model and you haven't picked a name and haven't wired the upscale_model input, the node raises a ValueError instead of quietly doing nothing. It's a deliberate fail-fast, but it's the first thing that'll trip you. Either pick a model in the dropdown or feed the input.

Where it fits in the workflow

In the pack's recommended helper-node layout, the flow is: first KSamplerVAEDecodeGigaHires Image UpscaleVAEEncodeGigaHires Refine Pass. The author's own notes say to prefer this branch over the pure latent path once the target gets large, because latent-only upscaling can stay blocky even after refinement.

Outputs are upscaled_image (wire it to VAEEncode, or straight to Save Image if you just want bigger pixels) and debug_info - a JSON string with the model used, whether it was loaded internally, the resolved size, and per-stage timings. Feed debug_info into GigaHires Debug Print to read it.

Install

Zero extra dependencies - this pack ships no requirements.txt at all. Via Manager, search for "comfyui-hires" or "GigaHires"; or manually:

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

Restart ComfyUI after. One real requirement hides in there: the pack is written on ComfyUI's newer native extension API (comfy_entrypoint in its __init__.py), so an old ComfyUI build simply won't register the nodes. If nothing shows up after install, update ComfyUI first, then reinstall the pack.

Troubleshooting

  • ValueError on run - no upscaler selected. Pick a upscale_model_name or wire the input.
  • Dropdown is empty - you have no models in ComfyUI/models/upscale_models. Drop in a 4x ESRGAN file and refresh.
  • Nothing happens / <skipped-downscale> in debug - your target isn't bigger than the source. Raise scale_by or the target size.
  • Nodes missing entirely - ComfyUI is too old for the extension API; update it.
Categorysampling/upscale

Inputs (8)

NameTypeDefaultDescription
imageIMAGE
methodCOMBOupscale_model2 options: upscale_model, lanczos
sizing_modeCOMBOscale2 options: scale, target
scale_byFLOAT2.000.1–8
target_widthINT00–16384
target_heightINT00–16384
upscale_model_nameCOMBONone1 options: None
upscale_modeloptUPSCALE_MODEL

Outputs (2)

NameTypeDescription
upscaled_imageIMAGE
debug_infoSTRING