Nodes/ComfyUI/Create Hook Keyframes Interp.
ComfyUI Node Runs on cloud

Create Hook Keyframes Interp.

The one node for smooth strength ramps on your LoRA

By Comfy-Org·Created 4 years ago·Updated 31 minutes ago· 129,926
Create Hook Keyframes Interp.
  • prev_hook_kf
  • HOOK_KF
strength_start1.000
strength_end1.000
interpolation
start_percent0.000
end_percent1.000
keyframes_count5
print_keyframesfalse

If you want a LoRA to fade in, you could place a keyframe every step by hand. Or you could use CreateHookKeyframesInterpolated ("Create Hook Keyframes Interp.") and type two numbers. This is the generator of the hook-scheduling family: you give it a starting strength, an ending strength, a percent window, and an easing curve, and it produces a whole HOOK_KEYFRAMES group that ramps between them. It's the node added a few days after the rest of the hook system landed - someone looked at the manual keyframe node and immediately asked for this.

How it works

It generates keyframes_count keyframes, evenly spaced between start_percent and end_percent, with strengths interpolated from strength_start to strength_end using the easing you pick:

  • linear - straight ramp.
  • ease_in - slow start, fast finish.
  • ease_out - fast start, slow finish.
  • ease_in_out - the S-curve; the one you'll use most.

Each keyframe's strength is a multiplier on the hook's base strength, so a 0.0 → 1.0 ramp takes a LoRA from off to its loaded strength over the window. The schedule then flows through SetHookKeyframes onto a HOOKS group and into a Set Props node, exactly like any keyframe set.

The inputs

  • strength_start / strength_end - the envelope's ends (0 to 10).
  • interpolation - the easing, from the four above.
  • start_percent / end_percent - where on the denoise timeline the ramp lives (0.0 to 1.0).
  • keyframes_count - how many keyframes to generate (2 to 100). More = smoother. Default 5 is genuinely fine for most ramps; nobody needs 100.
  • print_keyframes - debug toggle that logs each generated keyframe's start_percent = strength to the console. Flip it on when the curve isn't what you expected, then off again.
  • prev_hook_kf - append onto an existing keyframe group instead of starting fresh.

Output: a single HOOK_KF (HOOK_KEYFRAMES) group.

What people actually do with it

The flagship move from the hook-system announcement (December 2024): schedule a style or character LoRA so it "takes over the scene" only for the middle of the run - ease_in_out from 0.0 to 1.2 across 20–70%, then back down - so the subject is strongly shaped during the composition phase but the base model's lighting and texture return for the final details. Paired with a mask on the conditioning, this gives you both where and when for a weight patch, which is more control than regional-prompting tools on A1111 ever offered.

The caveats

The percent window is a fraction of the whole run, not a step count, so the same 0.2–0.7 window maps correctly whatever step count you use. And the family reminder: the schedule itself is cheap - the cost is in the hooks it drives, each of which means a separate model pass during sampling. Ramps don't multiply that; the number of attached hooks does. One more genuine gotcha: strength_start/strength_end here are clamped to 0–10, while the underlying keyframes can go negative - if you want an inverted segment, build it from CreateHookKeyframe stops instead.

Ships with ComfyUI core, no install, experimental. Under advanced → hooks → scheduling.

Categoryadvanced/hooks/scheduling

Inputs (8)

NameTypeDefaultDescription
strength_startFLOAT1.0000–10
strength_endFLOAT1.0000–10
interpolationCOMBO4 options: linear, ease_in, ease_out, ease_in_out
start_percentFLOAT0.0000–1
end_percentFLOAT1.0000–1
keyframes_countINT52–100
print_keyframesBOOLEANfalse
prev_hook_kfoptHOOK_KEYFRAMES

Outputs (1)

NameTypeDescription
HOOK_KFHOOK_KEYFRAMES