LoRA Hook Keyframe ππ π
Hand-placing a step in your LoRA's strength schedule
- prev_hook_kf
- HOOK_KF
Worth knowing before anything else: LoRA Hooks aren't a random extra this pack bolted on. When ComfyUI's core team shipped native masking and scheduling for LoRA and model weights in late 2024, comfyanonymous credited the underlying work directly to Kosinkadink, this pack's author - "this is work by kosinkadink the author of the animatediff extension. He added a bunch of things to the model patcher in core comfyui." This node is part of the original, AnimateDiff-side version of that idea: a way to make a LoRA's strength change at specific points across a generation, rather than staying fixed the whole time.
What it does
A LoRA Hook (built elsewhere, with a node like Register LoRA Hook) is a LoRA that only activates when explicitly attached - to a piece of conditioning, a masked region, or a time window - instead of applying globally like a normal LoRA loader. This node builds one entry in that hook's timing schedule: at start_percent of the way through sampling, the hook's strength becomes strength_model, and it holds for at least guarantee_steps steps even if the schedule would otherwise move past it sooner.
One keyframe alone gives you a single strength change. Chain several together - each one's prev_hook_kf pointing at the previous node's output - and you build up a full step function: LoRA off for the first third of the clip, on at half strength for the middle, full strength for the finish, or whatever shape your generation actually needs.
The inputs and outputs that matter
Required: strength_model (default 1, range β20 to 20) - the LoRA strength this keyframe sets. start_percent (default 0, range 0β1) - where in the sampling process this keyframe kicks in. guarantee_steps (default 1) - the minimum number of steps this keyframe's value holds regardless of how tightly-packed your schedule is.
Optional: prev_hook_kf (HOOK_KEYFRAMES) - chain in an earlier keyframe to build a multi-step schedule instead of a single flat value.
Output is a single HOOK_KF (HOOK_KEYFRAMES), which attaches to a LoRA Hook to give it this timing behavior.
How to install it
ComfyUI Manager: search AnimateDiff Evolved, confirm the author is Kosinkadink, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved
then restart. This node needs no model download of its own - it's scheduling logic sitting on top of a LoRA hook you've built and a LoRA file you already have.
Common issues & troubleshooting
Built a chain of these and nothing seems scheduled - the LoRA just applies flat. Confirm the final HOOK_KF output actually reaches the hook node's keyframe input, and that the hook itself is attached to conditioning or a region that's genuinely part of what's being sampled. A disconnected schedule has no effect and won't throw an error telling you so.
Strength jumps abruptly between keyframes instead of ramping smoothly. That's correct behavior for this node - it's a step function, not an interpolated curve. If you want a smooth ramp between two strengths instead of hand-placing discrete steps, use LoRA Hook Keyframes Interp. instead, which generates a whole interpolated range from two endpoints in one node.
This corner of the pack is genuinely under-discussed. True across the whole LoRA hook system - community writeups are thin even relative to the rest of this already-niche pack. For most workflows, if you just want one LoRA active for the whole clip, a plain LoRA loader is simpler and does the job; reach for hook keyframes specifically once you have a concrete need for a LoRA's strength to change mid-generation.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| strength_model | FLOAT | 1.00-20β20 | β |
| start_percent | FLOAT | 0.0000β1 | β |
| guarantee_steps | INT | 10β9007199254740991 | β |
| prev_hook_kfopt | HOOK_KEYFRAMES | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| HOOK_KF | HOOK_KEYFRAMES | β |