hiresfixScale
The model-based upscale step your two-pass workflow is missing
- vae
- image
- latent
- image
hiresfixScale is the node that runs your image through a real upscaling model - an ESRGAN-style upscaler like 4x-UltraSharp or Remacri - and then, if you want, re-encodes it back to a latent so you can run a low-denoise second sampling pass. That second part is what separates it from a plain Upscale Image node: it's built for the classic two-pass "hires fix" loop.
Here's the workflow it's designed for: you generate at native resolution (say 1024Γ1024 for SDXL), run the image through this node with a 4x model, then feed the returned latent into a sampler with denoise around 0.3β0.5. The model upscale adds real pixels (well, sharper pixels - model upscalers like UltraSharp clean up without inventing much), and the low-denoise pass re-adds coherent detail. Without the second pass you'd just have a bigger, slightly cleaner image; with it you get the "hires fix" look that fixes tiling and smudginess at high resolution.
How it works
The mechanism, from the source: it loads your chosen upscale model from the upscale_models folder (model_name), runs ImageUpscaleWithModel, then optionally rescales the result. Finally, if output_latent is on, it VAE-encodes the pixels (cropping to multiples of 8 first - dimensions not divisible by 8 are trimmed from the center, which is why you may see slightly smaller output than expected) and hands you the latent.
The post-model rescale step matters because a 4x upscale can overshoot your VRAM and your composition. You can rescale by percentage (default 50%), to Width/Height, or to longer side - maintain aspect, with rescale_method (lanczos, bicubic, etc.) and crop (center) controlling the resize.
Inputs and outputs
model_name- the upscale model; pick from the.safetensorsfiles inComfyUI/models/upscale_models. You'll need to drop a model there yourself - 4x-UltraSharp is the community default.vae- required, for the latent encode step.image- the input pixels, usually from a sampler's image output or a VAE decode.rescale_after_model- on by default; toggle off to keep the raw model output size.output_latent- on by default, producing thelatentoutput you'll feed the second pass. Turn it off and you just get theimage.- Outputs:
latentandimage, plus standard preview/save viaimage_output/save_prefix.
Installing it
Part of tinyterraNodes:
cd ComfyUI/custom_nodes
git clone https://github.com/TinyTerra/ComfyUI_tinyterraNodes.git
or ComfyUI Manager β tinyterraNodes. No pip dependencies - but you must supply an upscale model file, because none ship with the pack.
Gotchas
The biggest gotcha is a settings trap, not a bug: if output_latent is on but you set image_output to Preview, you'll see the upscaled image in the UI even though the node's actual job is the latent. And if your VAE-encoded latent gets fed straight into a sampler, remember the composition changed relative to your first pass - that's why denoise 0.3β0.5 is the sweet spot; anything much higher and the second pass redraws instead of refining. Also: center-cropping to multiples of 8 means an odd-size source silently loses a few edge pixels, so don't obsess over exact output dimensions from a 1345Γ769 source.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | 0 options: | |
| vae | VAE | β | |
| image | IMAGE | β | |
| rescale_after_model | COMBO | true | 2 options: false, true |
| rescale_method | COMBO | 6 options: nearest-exact, bilinear, area, bicubic, lanczos, bislerp | |
| rescale | COMBO | 3 options: by percentage, to Width/Height, to longer side - maintain aspect | |
| percent | INT | 500β1000 | β |
| width | INT | 102464β16384 | β |
| height | INT | 102464β16384 | β |
| longer_side | INT | 102464β16384 | β |
| crop | COMBO | 2 options: disabled, center | |
| image_output | COMBO | 4 options: Hide, Preview, Save, Hide/Save | |
| save_prefix | STRING | ComfyUI | β |
| output_latent | COMBO | true | 2 options: false, true |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | β |
| image | IMAGE | β |