Nodes/ComfyUI/Create Hook Keyframe
ComfyUI Node Runs on cloud

Create Hook Keyframe

Place one strength stop on your hook's timeline

By Comfy-Org·Created 4 years ago·Updated about 2 hours ago· 129,808
Create Hook Keyframe
  • prev_hook_kf
  • HOOK_KF
strength_mult1.00
start_percent0.000

CreateHookKeyframe ("Create Hook Keyframe") is the smallest unit in ComfyUI's hook-scheduling system: one strength point, at one point in the sampling run. Chain several together with the prev_hook_kf input and you've hand-drawn a strength envelope for a LoRA - in at 0%, cranked to 1.5 by 30%, dialed back to 0.4 by 70%, off at the end. It's the manual, no-autopilot way to schedule weights, and it's exactly the tool when the other keyframe creators' ramps don't match the curve in your head.

What a keyframe is

Sampling runs from 0% to 100% of the denoise timeline. A keyframe is a (strength_mult, start_percent) pair: "at this point in the run, the hook's strength should be this." The hooks system picks the current keyframe by the sampler's position and multiplies its strength into the hook's base strength - so a keyframe at 0.5 on a LoRA loaded at strength 1.0 runs the LoRA at 0.5 effective. It's a multiplier, not an absolute. And a keyframe at start_percent stays active until the next keyframe's start - that's how you build a step function from stops.

The two dials

  • strength_mult - the multiplier at this stop. Range −20 to 20. Negative flips the patch; 0 turns the hook off for that segment.

  • start_percent - where on the timeline this stop begins (0.0 to 1.0).

  • prev_hook_kf - the existing keyframe group to append to. This is what makes keyframes composable: first keyframe into the second node's prev_hook_kf, second into the third, and so on. Output HOOK_KF (a HOOK_KEYFRAMES group) then feeds SetHookKeyframes, which marries the schedule to a HOOKS group.

When you'd reach for it instead of the generators

CreateHookKeyframesInterpolated is the lazy-good option: two strengths and an easing, and it fills in the ramp. CreateHookKeyframesFromFloats is the data-driven option: a list of numbers in, a schedule out. This node is for the schedule that's not a smooth ramp - a hold ("keep it at 1.0 from 20% to 70%"), a pulse, a late spike. Three keyframes placed by hand cover most of what people actually want, and each one is a single visible value you can tweak without regenerating anything.

One genuine convenience: the first keyframe in a group gets special handling so it's guaranteed to be active for at least one step even if sampling starts mid-range - a subtle detail that saves you from a "my first value never fires" mystery.

The practical part

This only matters downstream of a working hook setup: keyframes → SetHookKeyframes → HOOKS → a Set Props node → the sampler. A schedule that never reaches a Set Props node is invisible. And remember the family math: every attached hook is a separate model pass, so a hand-built envelope with several segments costs the same as one with two. The scheduling doesn't add passes; the hooks do.

Ships with ComfyUI core, nothing to install, experimental like the rest of the hooks family. Under advanced → hooks → scheduling.

Categoryadvanced/hooks/scheduling

Inputs (3)

NameTypeDefaultDescription
strength_multFLOAT1.00-20–20
start_percentFLOAT0.0000–1
prev_hook_kfoptHOOK_KEYFRAMES

Outputs (1)

NameTypeDescription
HOOK_KFHOOK_KEYFRAMES