Nodes/ComfyUI_agilly1989_motorway/CreateHookKeyframesFromFloats_motorway_edition
ComfyUI Node

CreateHookKeyframesFromFloats_motorway_edition

A list of strengths becomes a keyframe timeline, on the bus

By agilly1989·Created 2 years ago·Updated about a year ago· 7
CreateHookKeyframesFromFloats_motorway_edition
  • MOTORWAY 🚌💨
  • MOTORWAY 🚌💨
INPUT_floats_strength_keyfloats_strength
INPUT_prev_hook_kf_keyprev_hook_kf
start_percent0.000
end_percent1.000
print_keyframesfalse
OUTPUT_HOOK_KF_keyHOOK_KF

Hand-placing one keyframe at a time gets old fast. CreateHookKeyframesFromFloats is the batch version: you hand it a list of strength values and it turns them into a whole keyframe timeline, spread across a start/end percent window. The _motorway_edition is the same core node, except that list of floats arrives via the Motorway bus instead of a wire.

How it works

The core node (from nodes_hooks.py) takes a FLOATS input - a list of numbers - and generates one keyframe per value, evenly distributed between start_percent and end_percent. So [1.0, 0.8, 0.6, 0.4, 0.2] over 0–1 gives you five keyframes ramping from full strength down to a fifth, each positioned at 0, 0.25, 0.5, 0.75, 1.0. Where does the list come from? Anywhere you can compute one - a schedule curve, an animation pass, a batch of floats from earlier in the Motorway. That's the key insight: this node decouples "figure out the strengths" from "place them on the timeline".

Inputs and outputs

  • MOTORWAY 🚌💨 - the bus, required.
  • INPUT_floats_strength_key - key of the FLOATS list in the bus, default floats_strength. This is the interesting input, and it's worth noting the core node defaults to a single -1 placeholder if nothing's connected.
  • INPUT_prev_hook_kf_key - key of an existing keyframe group to append to, default prev_hook_kf.
  • start_percent / end_percent - the window the keyframes spread across, 0–1.
  • print_keyframes - a boolean that dumps the generated keyframes to the console, handy when you're debugging a schedule. Default off.
  • OUTPUT_HOOK_KF_key - key for the result, default HOOK_KF.

Only output: the Motorway.

Installing

cd ComfyUI/custom_nodes
git clone https://github.com/agilly1989/ComfyUI_agilly1989_motorway

Restart, or ComfyUI Manager → "ComfyUI_agilly1989_motorway". No pip deps.

Caveats

Pack-wide: active beta, "BIG BROKEN WITH ASYNC" README banner, _motorway_edition clones commented out of __init__.py in the version I checked (uncomment ClonedNodeMapping if missing), keys exact and case-sensitive. One practical tip: turn on print_keyframes while you're building the schedule - keyframe bugs are invisible otherwise, and the console output makes the placement obvious. And remember the whole hooks system is EXPERIMENTAL in core ComfyUI; treat this as a power tool, not a foundation.

Categoryagilly1989 Nodes/Motorway-ed/advanced/hooks/scheduling

Inputs (7)

NameTypeDefaultDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨
INPUT_floats_strength_keySTRINGfloats_strength
INPUT_prev_hook_kf_keySTRINGprev_hook_kf
start_percentFLOAT0.0000–1
end_percentFLOAT1.0000–1
print_keyframesBOOLEANfalse
OUTPUT_HOOK_KF_keySTRINGHOOK_KF

Outputs (1)

NameTypeDescription
MOTORWAY 🚌💨MOTORWAY 🚌💨