CfgScheduleHookProvider
Ramp CFG across an iterative upscale instead of holding it fixed
- PK_HOOK
Impact Pack's Iterative Upscale runs several sampling passes as it enlarges an image step by step, and by default every pass uses whatever fixed CFG you set on the upscaler provider. CfgScheduleHookProvider changes that: it builds a PK_HOOK that gradually shifts CFG from whatever the upscaler is currently using toward a target_cfg as the iterative steps progress, instead of holding it constant across the whole run.
A PK_HOOK (Pixel-KSample Hook) is the upscale-side equivalent of the DETAILER_HOOKs you'd attach to a face detailer - a small behavior plugged into an upscaler-provider node's hook slot that modifies something about each iteration as the loop runs. This one's job is narrowly CFG, and CFG only.
Why you'd want a CFG ramp instead of a fixed value
Early upscale steps are working from a lower-detail base and often benefit from a different guidance strength than the later, near-final steps. A common pattern is starting closer to your normal generation CFG and easing toward a lower target_cfg as detail accumulates, so the later passes don't over-guide an already-mostly-resolved image. The node doesn't force a direction - you set the target_cfg and it interpolates toward it, so you can ramp up or down depending on what your upscale actually needs.
The inputs and output
schedule_for_iteration- currently a single choice,simple. This selects the interpolation style used to move from the starting CFG totarget_cfgacross the iteration count;simpleis the only option exposed right now.target_cfg(FLOAT, default 3, range 0–100) - the CFG value the schedule moves toward by the final iteration. The default of 3 is noticeably lower than a typical starting CFG (7–8 is common), which tells you the built-in assumption: ease guidance down as the image resolves, rather than up.
Output is a single PK_HOOK - wire it into the pk_hook_opt (or equivalent hook slot) on an upscaler provider node like PixelKSampleUpscalerProviderPipe, PixelKSampleUpscalerProvider, or the mask-based variants. If you also want to schedule steps or denoise at the same time, combine multiple PK_HOOKs first with PixelKSampleHookCombine - most upscaler-provider nodes only expose one 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 - it's a scheduling function, nothing more.
Common issues & troubleshooting
Connected the hook and CFG doesn't seem to change. Confirm it's actually wired into the upscaler provider's hook input, not left dangling - and confirm you're using an upscaler-provider node that supports PK_HOOK at all (Iterative Upscale itself doesn't take a hook directly; the hook goes on the provider node feeding it).
Want to ramp CFG and denoise together. This node only touches CFG. For denoise, you want the sibling DenoiseScheduleHookProvider; for steps, StepsScheduleHookProvider. Build each hook separately, then fuse them with PixelKSampleHookCombine before feeding the result into the upscaler provider's single hook slot.
Not sure this is worth the setup. For most iterative upscales, a fixed CFG on the upscaler provider is fine and simpler to reason about. Reach for this hook specifically if you're seeing over-guided, crunchy detail on later upscale passes and want to ease off automatically rather than tuning a single static value by trial and error.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| schedule_for_iteration | COMBO | 1 options: simple | |
| target_cfg | FLOAT | 3.000–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| PK_HOOK | PK_HOOK | — |