HighRes-Fix Script
HighRes-Fix Script
- script
- SCRIPT
Diffusion models have a native-resolution ceiling. Push SDXL much past 1024 in a single pass and you get the classic mutations - twin torsos, extra limbs. So the standard move is: generate at native res, then upscale and run a second low-denoise sampling pass to add real detail. That two-pass dance is "hires fix," and this node packages the whole thing into one script you clip onto an Efficient KSampler.
Key thing to understand up front: this node doesn't sample anything. It's a script. Its only output is a SCRIPT, which you wire into the script input of a KSampler (Efficient). The sampler runs the upscale-and-resample for you; this node just carries the settings.
How it works
You choose how to enlarge the image and how hard to re-sample it. upscale_type picks the lane - latent, pixel, or both. Latent upscaling is the interesting one: it enlarges the image in latent space and lets the second sampling pass invent detail, which is where the actual "fix" happens. The included latent upscalers under latent_upscaler go beyond the basic interpolations (nearest-exact, bilinear, bicubic, bislerp…) to neural ones - city96.v1, city96.xl, ttl_nn.SDXL, ttl_nn.SD 1.x - the ones people actually reach for.
The knobs that matter
upscale_by- the scale factor, default1.25. Modest is smart; 1.5–2× per pass is plenty.denoise- default0.56. This is the dial. Too low and the pass does nothing; too high and it rewrites your image into a different picture. Somewhere in the 0.4–0.6 range is the usual sweet spot for adding detail without losing the composition. This is exactly the "adding detail is generation, and it will rewrite faces" trade-off - respect it.hires_steps- steps for the second pass, default12. You don't need a full 20+; the image already exists.use_same_seedandseed- reuse the first pass's seed or roll a fresh one.iterations- how many times to repeat the climb (up to 5).
There's also a ControlNet path - use_controlnet, control_net_name, strength, preprocessor - for structure-guided upscaling that keeps edges honest. The optional script input lets you chain this behind another script node (XY Plot, Noise Control) so they stack.
Installing it
ComfyUI Manager → search Efficiency Nodes for ComfyUI, or:
cd ComfyUI/custom_nodes
git clone https://github.com/jags111/efficiency-nodes-comfyui
Restart after. One real dependency wrinkle: the neural latent upscalers (city96.*, ttl_nn.*) are model files the node pulls from Hugging Face on first use. If you're offline or on a flaky connection, create a models folder inside ComfyUI/custom_nodes/efficiency-nodes-comfyui/ and drop the files there - for example git clone https://huggingface.co/city96/SD-Latent-Upscaler into it - and it'll load them locally. The ControlNet-guided upscaling feature separately requires Fannovel16's comfyui_controlnet_aux to be installed.
Common issues
If the latent upscaler options are missing or error on first run, it's almost always the Hugging Face download failing - check your connection or place the models locally as above. If ControlNet options do nothing, you're missing comfyui_controlnet_aux.
And the pack-wide ones apply here too: an IMPORT FAILED at startup (often citing a pip freeze error) means the whole pack didn't load, so update ComfyUI, your packages and the node. After a ComfyUI update breaks it, updating the node to latest is usually the fix - the maintainer asks you to do that before reporting anything.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| upscale_type | COMBO | 3 options: latent, pixel, both | |
| hires_ckpt_name | COMBO | 1 options: (use same) | |
| latent_upscaler | COMBO | 9 options: nearest-exact, bilinear, area, bicubic, bislerp, city96.v1, +3 | |
| pixel_upscaler | COMBO | 0 options: | |
| upscale_by | FLOAT | 1.250.01–8 | — |
| use_same_seed | BOOLEAN | true | — |
| seed | INT | 00–18446744073709550000 | — |
| hires_steps | INT | 121–10000 | — |
| denoise | FLOAT | 0.560–1 | — |
| iterations | INT | 10–5 | — |
| use_controlnet | COMBO | 1 options: _ | |
| control_net_name | COMBO | 0 options: | |
| strength | FLOAT | 1.000–10 | — |
| preprocessor | COMBO | 1 options: _ | |
| preprocessor_imgs | BOOLEAN | false | — |
| scriptopt | SCRIPT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SCRIPT | SCRIPT | — |