Nodes/AnimateDiff Evolved/Set LoRA Hook Keyframes πŸŽ­πŸ…πŸ…“
ComfyUI Node Runs on cloud

Set LoRA Hook Keyframes πŸŽ­πŸ…πŸ…“

Attaching a built keyframe schedule onto a LoRA hook

By KosinkadinkΒ·Created 3 years agoΒ·Updated 8 days agoΒ· 3,519
Set LoRA Hook Keyframes πŸŽ­πŸ…πŸ…“
  • lora_hook
  • hook_kf
  • HOOKS

Displayed as Set LoRA Hook Keyframes, this is the join point in a system that's assembled across several nodes in this pack. It's worth seeing the whole chain before this one node makes sense on its own.

The full LoRA Hooks pipeline

A register node - ADE_RegisterLoraHook or one of its model-only/checkpoint-as-lora variants - creates the HOOKS object itself: a LoRA (or a whole checkpoint used as one) that stays inert until explicitly attached, rather than applying globally like a plain loader. A keyframe node - ADE_LoraHookKeyframe, chainable with itself via prev_hook_kf to build a multi-step schedule - builds the timing: at a given start_percent through sampling, the hook's strength becomes some value, holding for at least guarantee_steps. Chained together, those keyframes form a HOOK_KEYFRAMES schedule: a step function of strength changes across the clip.

This node is where those two pieces meet. It takes an already-registered HOOKS object and a built HOOK_KEYFRAMES schedule, and merges them - producing a new HOOKS that actually carries the timing behavior. The result still needs an attach step (ADE_AttachLoraHookToCLIP or ADE_AttachLoraHookToConditioning) before any of it affects generation. So the full picture is four steps: register, schedule, set, attach - and this node is step three.

Inputs and output

Both required, no optional inputs:

  • lora_hook (HOOKS) - the registered hook you're attaching timing to.
  • hook_kf (HOOK_KEYFRAMES) - the built schedule, from ADE_LoraHookKeyframe or a chain of them.

Output is HOOKS - the same type as the input, now carrying the schedule, ready for an attach node downstream.

How to install it

ComfyUI Manager: search AnimateDiff Evolved, confirm the author is Kosinkadink, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved

No model download for this node itself - it's scheduling logic sitting on top of a hook and a LoRA (or checkpoint) you've already registered.

Common issues & troubleshooting

Built a keyframe schedule and the LoRA still applies flat, with no timing. Confirm this node is genuinely between the register and attach steps in your graph - a HOOK_KEYFRAMES chain that never reaches ADE_SetLoraHookKeyframe has nowhere to attach, and a HOOKS output from this node that never reaches an attach node downstream has no effect on generation either. Both connections need to be there.

Not sure which HOOKS object to feed in. It should be the output of a register node - ADE_RegisterLoraHook or one of its model-only/checkpoint-as-lora siblings - not the attach node's own output. This node sits before the attach step, not after it.

Wondering if you need this whole system. For most AnimateDiff workflows, you don't. LoRA Hooks - registration, keyframing, and this setting step - are for the specific case of a LoRA's strength needing to change at defined points across the clip. If you just want a LoRA active the whole time, a plain LoRA loader upstream of your checkpoint is simpler and does the job with none of this plumbing.

CategoryAnimate Diff πŸŽ­πŸ…πŸ…“/conditioning

Inputs (2)

NameTypeDefaultDescription
lora_hookHOOKSβ€”
hook_kfHOOK_KEYFRAMESβ€”

Outputs (1)

NameTypeDescription
HOOKSHOOKSβ€”