WAN Input Frame Number ποΈπ ’π
The tiny node that kills the (frames-1)/4 error for good
- frame_number
If you've run any Wan workflow for more than an afternoon, you've hit the wall: "length must satisfy (frames - 1) divisible by 4". You type 80, fail. Type 82, fail. Wan's latent temporal structure only accepts lengths where (frames - 1) is a multiple of 4 - 81, 85, 89, 161 - because that's the convention the model's compressed temporal axis was built around. WAN Input Frame Number ποΈπ ’π is a one-job node that makes that failure impossible: you pick a frame count, it validates it against the rule, and passes it through as an INT.
What it is
Exactly one required input: frame_number, an INT with a default of 81, a range of 1 to 10,000, and - tellingly - a step of 4. It outputs the same frame_number back out, now guaranteed to satisfy the Wan constraint. If you somehow feed it a number that breaks the rule, it raises a ValueError instead of letting you run a doomed generation. The UI step of 4 already makes it hard to type a bad number; the node makes it impossible to wire one in.
That's the whole node. It doesn't interpolate, blend, or render anything. It's a constraint checker with a wire out - and that's exactly what a utility node in a pack like this should be.
Where it goes
In the pack's Vace_Travel.json workflow, this node picks the total output frame count and feeds it to VideoContinuationGenerator (whose own total_output_frames field enforces the same rule) and down into the Wan sampling path. 81 frames at the standard 16 fps is about 5 seconds - the native context length Wan is happiest with. The Wan ecosystem doc in the KB notes 81 frames is the practical default for a reason; going longer means chaining segments, which is the whole game Steerable Motion is playing.
If you're hand-building a Wan workflow and you keep getting length errors, drop this node in and wire its output into any frame-count input in the chain. It's also a handy place to standardize your clip length across a batch of continuations, so every segment you stitch with WanVideoBlender comes out the same size.
Install and quirks
Part of the standard pack install: ComfyUI Manager β search "Steerable Motion", or git clone https://github.com/banodoco/steerable-motion into ComfyUI/custom_nodes/ and restart. The repo's own dependency footprint is a single matplotlib line - everything heavy (the Wan models, Kijai's WanVideoWrapper) is workflow-side.
Two small things: if the node doesn't appear after install, restart ComfyUI properly - it's in the pack's __init__, so a fresh load picks it up. And remember it's a pass-through, not a calculator: it won't round 80 up to 81 for you. You feed it a rule-compliant number, it confirms, and the error that used to end your run simply never fires again.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| frame_number | INT | 811β10000 | Frame number where (frames - 1) is divisible by 4. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| frame_number | INT | β |