Nodes/ComfyUI Impact Pack/Upscaler (SEGS/pipe)
ComfyUI Node Runs on cloud

Upscaler (SEGS/pipe)

Upscale while re-detailing detected regions

By ltdrdata·Created 3 years ago·Updated 4 months ago· 3,248
Upscaler (SEGS/pipe)
  • image
  • segs
  • basic_pipe
  • upscale_model_opt
  • upscaler_hook_opt
  • scheduler_func_opt
  • IMAGE
rescale_factor2.00
resampling_method
supersample
rounding_modulus8
seed0
steps20
cfg8.00
sampler_name
scheduler
denoise0.50
feather5
inpaint_modelfalse
noise_mask_feather20

Upscaler (SEGS/pipe) does two jobs in one node: it upscales your image and runs a fresh sampling pass over the regions you detected, so faces and hands get re-detailed at the bigger size instead of just being interpolated larger. Plain upscalers add pixels; this one adds pixels and then re-generates the important bits at full resolution. That combination - more resolution plus a targeted detail pass - is exactly the multi-stage finishing move the community converged on years ago.

It slots into Impact Pack's whole reason for being. The pack automates detect-crop-refine: find a region (that's your SEGS), crop it, resample it at proper resolution, paste it back. This node is the upscale-flavoured version of that loop. You hand it the image, the SEGS marking what to refine, and a basic_pipe carrying your model/clip/vae/prompts, and it scales the whole thing up while giving each detected region its own sampling pass at the new scale. One node, whole finished result.

The inputs that matter

There are a lot of widgets here, because it's essentially a sampler plus an upscaler bolted together. The ones a beginner actually sets:

  • rescale_factor (default 2) - how much bigger. 2 doubles each dimension.
  • denoise (default 0.5) - how hard the re-detail pass hits the regions. This is the dial that decides everything. Low (0.3–0.4) refreshes detail while staying faithful to the original; push it up and the regions start to change, not just sharpen. Keep it modest unless you want new content.
  • steps / cfg / sampler_name / scheduler / seed - the usual sampling controls for the detail pass. Defaults (20 steps, cfg 8) are a fine starting point; match them to whatever your base generation liked.
  • upscale_model_opt (optional) - plug in an ESRGAN-family model (4x-UltraSharp, Remacri, an anime variant) and it does the pixel enlargement with that instead of plain interpolation, then resamples. This is usually what you want: a real upscale model carries detail a Lanczos resize can't.

The required image, segs, and basic_pipe are the three connections that make it go. Output is a single upscaled, re-detailed IMAGE.

There are also feather and noise_mask_feather controls for blending the resampled regions back - leave them near default unless you see seams - and an inpaint_model toggle for when your basic_pipe model is an inpainting checkpoint.

Getting the most out of it

The order-of-operations rule from the upscaling world applies here and it's worth stating: fix detail at a sensible resolution, don't bake defects in and then enlarge them. Because this node detects-and-refines as part of the upscale, it's doing the right thing by design - the detail pass happens at the upscaled size where there's budget for it. Feed it good SEGS (detect the faces/hands you care about) and a clean upscale_model_opt, keep denoise restrained, and you get a genuinely finished image out of one node.

Where people overshoot: cranking denoise. At 0.6+ the "refined" faces stop resembling the originals - the pass invents rather than sharpens. If identity drifts, that's the first knob to pull back.

Common issues

VRAM is the real constraint. You're upscaling and sampling, so a big rescale_factor on a large image can OOM on modest cards; step the factor down or upscale in two smaller passes. Empty or bad SEGS means nothing gets re-detailed - check your detector actually found the regions. And if the enlarged regions look pasted-on, nudge feather up a little so the composite blends. This is a heavier node than a plain upscale, so expect it to cost real time and memory; that's the price of doing both jobs at once.

Installing it

The node is part of ComfyUI Impact Pack. Install through ComfyUI-Manager (search ComfyUI Impact Pack, Install, restart), or manually: cd ComfyUI/custom_nodes && git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack, install its requirements.txt into ComfyUI's Python environment (portable: ..\..\..\python_embeded\python.exe -m pip install -r requirements.txt), and restart. On first run the pack auto-downloads a SAM model into ComfyUI/models/sams. To generate the SEGS this node consumes you'll typically also want a detector - the YOLO provider now lives in the separate ComfyUI-Impact-Subpack since v8.0 - plus an ESRGAN upscale model in ComfyUI/models/upscale_models for the upscale_model_opt input. Impact Pack is ltdrdata's, the ComfyUI-Manager author, so it's well-maintained and safe.

CategoryImpactPack/Upscale

Inputs (19)

NameTypeDefaultDescription
imageIMAGE
segsSEGS
basic_pipeBASIC_PIPE
rescale_factorFLOAT2.000.01–100
resampling_methodCOMBO4 options: lanczos, nearest, bilinear, bicubic
supersampleCOMBO2 options: true, false
rounding_modulusINT88–1024
seedINT00–18446744073709550000
stepsINT201–10000
cfgFLOAT8.000–100
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO17 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +11
denoiseFLOAT0.500.0001–1
featherINT50–100
inpaint_modelBOOLEANfalse
noise_mask_featherINT200–100
upscale_model_optoptUPSCALE_MODEL
upscaler_hook_optoptUPSCALER_HOOK
scheduler_func_optoptSCHEDULER_FUNC

Outputs (1)

NameTypeDescription
IMAGEIMAGE