Nodes/ComfyUI Impact Pack/StepsScheduleHookProvider
ComfyUI Node Runs on cloud

StepsScheduleHookProvider

Ramp step count across an iterative upscale

By ltdrdata·Created 3 years ago·Updated 4 months ago· 3,242
StepsScheduleHookProvider
    • PK_HOOK
    schedule_for_iteration
    target_steps20

    The third of Impact Pack's iteration-schedule hooks, alongside CfgScheduleHookProvider and DenoiseScheduleHookProvider. Where those ramp CFG and denoise across an Iterative Upscale's steps, StepsScheduleHookProvider builds a PK_HOOK that gradually shifts the sampling step count toward a target_steps as the iterations progress, per the README: "IterativeUpscale provides a hook that gradually changes the sampling-steps to target_steps as the iterative-step progresses."

    Same PK_HOOK mechanism as its two siblings - a small behavior plugged into an upscaler-provider node's hook slot that modifies one setting per iteration instead of holding it fixed for the whole run.

    Why ramp steps instead of holding them fixed

    Later upscale steps are usually working on an image that's already mostly resolved, and a lighter resample - fewer steps, since you're likely already running a low denoise on top - can be enough to add the remaining detail without paying the compute cost of a full step count on every single iteration. Ramping steps down as the upscale progresses spends more compute early, when there's more work to do, and less later, when there's less left to fix.

    The inputs and output

    • schedule_for_iteration - currently just simple, the only interpolation style exposed.
    • target_steps (INT, default 20, range 1–10000) - the step count the schedule moves toward by the final iteration.

    Output is a single PK_HOOK - wire it into the hook slot on an upscaler-provider node (PixelKSampleUpscalerProvider, PixelTiledKSampleUpscalerProvider, or a pipe variant). Combine with CfgScheduleHookProvider and/or DenoiseScheduleHookProvider via PixelKSampleHookCombine if you want more than one schedule active - most providers only expose a single hook input.

    How to install it

    Via ComfyUI Manager: search ComfyUI Impact Pack, install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack comfyui-impact-pack
    cd comfyui-impact-pack
    python -m pip install -r requirements.txt   # ComfyUI's python; python_embeded on portable
    

    then restart. No models - pure scheduling logic.

    Common issues & troubleshooting

    Steps don't seem to change across iterations. Confirm the hook is wired into the upscaler provider node's hook input, not Iterative Upscale itself - the top-level iterator doesn't take a PK_HOOK directly, only the provider feeding it does.

    Later passes look under-cooked. If target_steps is set too low relative to where you started, the tail end of the upscale may not have enough steps left to properly resolve at a given denoise. Raise the target, or reconsider whether your denoise is too high for the reduced step count.

    Want to schedule CFG or denoise too. This node only touches step count. Build CfgScheduleHookProvider and/or DenoiseScheduleHookProvider separately and fuse them with PixelKSampleHookCombine before the single hook slot on your upscaler provider.

    Is this worth setting up? For most iterative upscales, a fixed step count is simpler and works fine. Reach for this specifically if you're trying to trim compute on later passes without hand-tuning a single static step value per run.

    CategoryImpactPack/Upscale

    Inputs (2)

    NameTypeDefaultDescription
    schedule_for_iterationCOMBO1 options: simple
    target_stepsINT201–10000

    Outputs (1)

    NameTypeDescription
    PK_HOOKPK_HOOK