ComfyUI Node Runs on cloud

HiresFix

The two-pass upscale, folded into one node

By yolain·Created 3 years ago·Updated 8 days ago· 2,633
HiresFix
  • pipe
  • image
  • vae
  • pipe
  • image
  • latent
model_name
rescale_after_modeltrue
rescale_method
rescale
percent50
width1024
height1024
longer_side1024
crop
image_outputPreview
link_id0
save_prefixComfyUI

Diffusion models have a native-resolution ceiling. Push SDXL much past 1024 and you get duplicated anatomy - twin torsos, extra limbs, tiled patterns. So the whole trick of getting a big, clean image is: generate at the model's comfortable size, then climb. "Hires fix" is that climb built into the generation - upscale the first-pass result, then run a second, light sampling pass over it so the model paints real detail into the new pixels. easy hiresFix packages that into a single node designed to drop onto the Easy-Use pipe.

How it works

Two things are happening, and the upscaling world keeps them straight for good reason. First, an upscale model (an ESRGAN-family network) enlarges the image - that adds pixels. Then a rescale step sizes it to your exact target. What you do next with the latent output - a second low-denoise sampler pass - is the part that adds invented detail. This node handles the upscale-and-resize half and hands you the latent teed up for that second pass, which is why it lives in the pipe-based Easy-Use flow: the pipe already carries the model and VAE it needs.

Naming which job you're doing matters. Enlarging is interpolation and can't hallucinate; the second sampling pass is generation and will rewrite fine detail (and faces), which is exactly what you want at low denoise and a disaster at high.

The inputs that matter

  • model_name - the upscale model (from your ComfyUI/models/upscale_models folder). Pick an ESRGAN-family model like 4x-UltraSharp or a realism-tuned one; this is what does the pixel enlargement.
  • rescale - how you specify the target size: by percentage, to Width/Height, or to longer side - maintain aspect. The one you choose decides which of the next fields is live.
  • percent / width / height / longer_side - the actual target, read according to rescale. percent (default 50) scales relative to current size; width/height set explicit dimensions; longer_side caps the long edge and keeps aspect ratio.
  • rescale_method (default bicubic) - the interpolation used for the resize (lanczos, bicubic, nearest-exact, ...). rescale_after_model controls whether that resize happens after the upscale model runs.
  • image_output - Preview, Save, Hide, etc., since this is a terminal node that can write the result.

Optional pipe is the normal way to feed it (it pulls model/vae/latent from the Easy-Use flow); you can also feed a raw image and vae directly. Outputs are pipe (continue the flow), image (the upscaled picture), and latent (encoded and ready for the second sampling pass).

Installing it

ComfyUI Manager: search ComfyUI Easy Use, install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/yolain/ComfyUI-Easy-Use

then install the requirements (install.bat on Windows, else pip install -r ComfyUI-Easy-Use/requirements.txt) and restart. You'll also need at least one upscale model in ComfyUI/models/upscale_models - grab one from the community (4x-UltraSharp is a popular start).

Common issues

  • No upscale models in the dropdown. The model_name list is empty until you put an ESRGAN-style .pth in ComfyUI/models/upscale_models and restart. That's the number-one "it won't let me pick anything."
  • The upscale looks smeared or plasticky. That's the enlargement without a generative second pass - the upscale model alone interpolates. Run a low-denoise sampler on the latent output (0.3-0.5 denoise is typical) to let the model add real texture back.
  • Faces or details changed. The second pass is generative and will rewrite detail if denoise is too high. Keep it low. If identity drifts, that's the giveaway your denoise strength is doing too much.
CategoryEasyUse/Fix

Inputs (15)

NameTypeDefaultDescription
model_nameCOMBO0 options:
rescale_after_modelCOMBOtrue2 options: false, true
rescale_methodCOMBO6 options: nearest-exact, bilinear, area, bicubic, lanczos, bislerp
rescaleCOMBO3 options: by percentage, to Width/Height, to longer side - maintain aspect
percentINT500–1000
widthINT102464–16384
heightINT102464–16384
longer_sideINT102464–16384
cropCOMBO2 options: disabled, center
image_outputCOMBOPreview6 options: Hide, Preview, Save, Hide&Save, Sender, Sender&Save
link_idINT00–9223372036854776000
save_prefixSTRINGComfyUI
pipeoptPIPE_LINE
imageoptIMAGE
vaeoptVAE

Outputs (3)

NameTypeDescription
pipePIPE_LINE
imageIMAGE
latentLATENT