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

PixelKSampleHookCombine

Stack two upscaler hooks into one wire

By ltdrdata·Created 3 years ago·Updated 4 months ago· 3,248
PixelKSampleHookCombine
  • hook1
  • hook2
  • PK_HOOK

Impact Pack's upscaler-provider nodes (PixelKSampleUpscalerProvider, PixelKSampleUpscalerProviderPipe, and the mask-based variants) generally expose a single PK_HOOK input slot. But you might want more than one hook behavior active at once - say, ramping CFG and denoise across an iterative upscale simultaneously. PixelKSampleHookCombine is the fix: it merges two PK_HOOKs into one, so a single slot can carry both behaviors.

This is the upscale-side counterpart to DetailerHookCombine, which does the identical job for DETAILER_HOOKs on the detailer side. Same pattern, different hook type.

How it works

Wire one hook into hook1, another into hook2. The node returns a single combined PK_HOOK that runs both - hook1 first, then hook2 - each time the upscaler provider invokes it during an iteration. The README gives the concrete example this node exists for: "if you want to simultaneously change cfg and denoise, you can combine the PK_HOOKs of CfgScheduleHookProvider and [DenoiseScheduleHookProvider]." Need a third hook in the mix? Chain combines - feed the output of one PixelKSampleHookCombine into hook1 (or hook2) of another, alongside a third hook.

The inputs and output

  • hook1 (PK_HOOK, required) - runs first.
  • hook2 (PK_HOOK, required) - runs after hook1.

Output is a single PK_HOOK - the fused hook, wired into any upscaler provider's hook slot the same way a single hook would be.

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 - the combine node itself is featherweight; whatever dependencies its individual hooks need (for instance, the noise-injection hooks need BlenderNeko's ComfyUI_Noise) are on those hooks, not on this one.

Common issues & troubleshooting

One of the two hooks doesn't seem to be taking effect. Order matters for hooks with documented interactions - check whether swapping which hook is hook1 versus hook2 changes the result. Some hook combinations have explicit ordering rules stated in their own docs (the Lama Remover hook's skip_sampling interaction is one concrete example elsewhere in the pack).

Nothing to connect / type errors. Both inputs are strictly PK_HOOK-typed - you need actual hook-provider nodes (CfgScheduleHookProvider, StepsScheduleHookProvider, a DenoiseScheduleHookProvider, etc.) feeding both slots, not arbitrary nodes.

Do you need this for a basic upscale? No. Most iterative upscales run fine with zero hooks, or with a single hook plugged straight into the provider's slot. Reach for this combine node only once you've decided you specifically want two hook behaviors active on the same upscale - otherwise it's an unnecessary extra node.

CategoryImpactPack/Upscale

Inputs (2)

NameTypeDefaultDescription
hook1PK_HOOK
hook2PK_HOOK

Outputs (1)

NameTypeDescription
PK_HOOKPK_HOOK