Nodes/ComfyUI-Advanced-ControlNet/Latent Keyframe From List πŸ›‚πŸ…πŸ…’πŸ…
ComfyUI Node Runs on cloud

Latent Keyframe From List πŸ›‚πŸ…πŸ…’πŸ…

Per-frame ControlNet strength from a list of floats

By KosinkadinkΒ·Created 3 years agoΒ·Updated 8 days agoΒ· 993
Latent Keyframe From List πŸ›‚πŸ…πŸ…’πŸ…
  • prev_latent_kf
  • LATENT_KF
β—„float_strengths-1.000β–Ί
β—„print_keyframesfalseβ–Ί

Latent keyframes are how this pack varies a ControlNet's strength per frame in a batch - frame 0 at full strength, frame 8 at half, and so on. That's the backbone of animated ControlNet work. This node is the batch-friendly way to build them: instead of wiring up a keyframe node per frame, you hand it a list of floats and it turns each value into the strength for the corresponding batch index. Float number 3 in the list becomes the strength for latent index 3.

Where it really shines is paired with a schedule generator - a Batch Value Schedule from ComfyUI_FizzNodes, for instance - so you can describe a strength curve across dozens of frames as a single list rather than a wall of nodes.

How it works

A latent keyframe is just a (batch_index, strength) pair: it tells the ControlNet how strongly to apply on one specific frame. This node takes a whole list of strengths and assigns them by position - the first float is the strength for batch index 0, the second for index 1, and onward down the list. The result is a latent keyframe group covering as many frames as your list is long, which you then feed into an Apply Advanced ControlNet node (via latent_kf_override) or into a Timestep Keyframe. Frames not covered by the list fall back to whatever the schedule's null strength is. It's the same effect as painting a uniform mask per frame, done numerically.

The inputs and outputs that matter

  • float_strengths (required, FLOAT) - the list of per-frame strengths. Each value maps to a batch index by its position in the list. This is designed to be driven by a float-list source like FizzNodes' Batch Value Schedule, so you can generate a smooth ramp or any curve you want.

Optional inputs: prev_latent_kf (LATENT_KEYFRAME) chains this onto an existing latent keyframe group so you can combine several, and print_keyframes (default false) dumps the generated keyframes to the console for debugging - handy when a curve isn't behaving and you want to see the actual numbers.

Output is LATENT_KF, into the latent_kf_override on an Apply Advanced ControlNet node, into a Timestep Keyframe's latent_keyframe input, or into another latent keyframe node's prev_latent_kf to keep chaining.

How to install it

ComfyUI Manager: search ComfyUI-Advanced-ControlNet, install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet

then restart. No dependencies. To feed it a proper list of floats you'll usually also want ComfyUI_FizzNodes (for Batch Value Schedule) - it's not required, but it's what makes this node worth using over hand-placed keyframes.

Common issues & troubleshooting

Nothing varies across frames. Two checks: the LATENT_KF output has to reach a ControlNet (via latent_kf_override on the apply node or latent_keyframe on a Timestep Keyframe), and your batch has to actually have multiple latents - latent keyframes do nothing on a single image.

The list length doesn't match the frame count. Frames beyond the list's end aren't assigned by this node and take the schedule's null strength. If later frames look uncontrolled, extend the list or set the null strength deliberately on your Timestep Keyframe.

A curve isn't doing what you expected. Turn on print_keyframes and read the emitted values against your frames - it's the fastest way to catch an off-by-one or a bad range coming out of your schedule generator.

CategoryAdv-ControlNet πŸ›‚πŸ…πŸ…’πŸ…/keyframes

Inputs (3)

NameTypeDefaultDescription
float_strengthsFLOAT-1.000β€”
prev_latent_kfoptLATENT_KEYFRAMEβ€”
print_keyframesoptBOOLEANfalseβ€”

Outputs (1)

NameTypeDescription
LATENT_KFLATENT_KEYFRAMEβ€”