Nodes/SP-Nodes/SP_HiresGen_Dynamic
ComfyUI Node

SP_HiresGen_Dynamic

The ramp curve behind SP_HiresGen's multi-pass upscale

By bananasss00·Created 2 years ago·Updated 6 days ago· 20
SP_HiresGen_Dynamic
    • dynamic_cfg
    start_megapixels0.5
    end_megapixels2.0
    start_steps4
    end_steps4
    start_cfg5.5
    end_cfg3.5
    start_denoise0.55
    end_denoise0.30
    start_noise0.50
    end_noise0.20

    This node is pure configuration - it doesn't touch an image itself. It defines the curve that SP_HiresGen follows as it runs its iterations: for everything that matters to a hi-res pass, you set a starting value and an ending value, and the iterations in between interpolate linearly from one to the other. That's the "dynamic" in the name - instead of one fixed setting applied to every pass, the pass itself changes as you go.

    How it works

    Standard hi-res fix advice is "generate small, upscale, denoise lightly" - one pass, one set of numbers. SP_HiresGen_Dynamic generalizes that into a schedule spanning however many iterations SP_HiresGen_HiresCfg tells it to run. Look at the defaults and the intent is obvious: start_megapixels (0.5) to end_megapixels (2.0) grows the resolution across the run rather than jumping straight to target size. start_denoise (0.55) easing down to end_denoise (0.3) mirrors the classic advice that later hi-res passes should touch the image less than earlier ones - the first pass is doing real generative work, the last pass is a light detail polish. start_cfg (5.5) to end_cfg (3.5) follows the same logic: stronger prompt adherence early, gentler guidance once composition is locked in. start_steps/end_steps and start_noise/end_noise round out the same idea for step count and injected noise.

    You won't get useful output from this node in isolation - it exists to be wired into dynamic_cfg on SP_HiresGen, which is the node that actually runs the passes.

    Inputs and outputs that matter

    • start_megapixels / end_megapixels (0.5-3 / 0.5-5) - the resolution ramp across iterations.
    • start_steps / end_steps - steps per iteration, both default to 4 out of the box, meaning no ramp unless you change one.
    • start_cfg / end_cfg (1-20) - guidance strength ramp; defaults ease from 5.5 to 3.5.
    • start_denoise / end_denoise (0.01-1) - the most consequential pair; defaults ease from 0.55 to 0.3.
    • start_noise / end_noise (0-100) - injected noise ramp.
    • Output: dynamic_cfg, feeding directly into SP_HiresGen's required dynamic_cfg input.

    How to install it

    Comes with the rest of the pack. Through ComfyUI Manager: search "SP-Nodes," install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/bananasss00/ComfyUI-SP-Nodes
    

    Then restart. No models, no dependencies - this node just outputs numbers.

    Common issues & troubleshooting

    Every iteration looks the same. Check whether your start/end pairs actually differ - start_steps and end_steps both default to 4, so unless you deliberately widen that gap (or any other pair), there's nothing for the ramp to interpolate.

    Later iterations wash out detail instead of adding it. end_denoise is set too low relative to how much upscaling headroom is left, or end_cfg dropped too far - nudge both up slightly rather than assuming the upscale model itself is at fault.

    Composition drifts across iterations. That's usually end_denoise set too high for a "polish" pass - 0.3-0.4 is the safe range for the final iteration if you want it to add detail without redrawing structure; this matches the general hi-res fix guidance that denoise above roughly 0.5 starts changing composition rather than refining it.

    CategorySP-Nodes/HiresGen

    Inputs (10)

    NameTypeDefaultDescription
    start_megapixelsFLOAT0.50.5–3
    end_megapixelsFLOAT2.00.5–5
    start_stepsINT41–10000
    end_stepsINT41–10000
    start_cfgFLOAT5.51–20
    end_cfgFLOAT3.51–20
    start_denoiseFLOAT0.550.01–1
    end_denoiseFLOAT0.300.01–1
    start_noiseFLOAT0.500–100
    end_noiseFLOAT0.200–100

    Outputs (1)

    NameTypeDescription
    dynamic_cfgSP_HiresGen_Dynamic