CreateHookKeyframesFromFloats_motorway_edition
A list of strengths becomes a keyframe timeline, on the bus
- MOTORWAY 🚌💨
- MOTORWAY 🚌💨
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-1placeholder 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.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — | |
| INPUT_floats_strength_key | STRING | floats_strength | — |
| INPUT_prev_hook_kf_key | STRING | prev_hook_kf | — |
| start_percent | FLOAT | 0.0000–1 | — |
| end_percent | FLOAT | 1.0000–1 | — |
| print_keyframes | BOOLEAN | false | — |
| OUTPUT_HOOK_KF_key | STRING | HOOK_KF | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MOTORWAY 🚌💨 | MOTORWAY 🚌💨 | — |