ComfyUI Node

WAN_Frames

Wan video frame counts without the error

By r-vage·Created about a year ago·Updated 5 months ago· 23
WAN_Frames
    • int
    value81

    WAN_Frames [RvTools] is the most single-purpose node in this pack: an integer input, defaulting to 81, that only lets you pick multiples of 4. It exists because Wan video - the Alibaba family that became the default local video model through 2.1 and 2.2 - is picky about how many frames you feed it, and "how many frames" is a number you end up tweaking constantly.

    Why you'd reach for it

    Wan 2.1's sweet spot is around 81 frames - roughly 3.4 seconds at 24 fps, which is why 81 is the default in most Wan workflows and why this node ships with it. The step: 4 constraint is the real feature: frame counts that aren't multiples of 4 (or 16, depending on the setup) throw errors or silently produce broken motion, and a dial that physically can't land on a bad number removes a whole class of beginner frustration.

    If you're building a Wan pipeline - loading your video, passing frame settings around in a pipe, or just setting up an empty latent - this gives you a single, clearly-labeled knob for the one number you'll actually tune. It's also useful as a documented value in someone else's workflow: when a shared workflow shows a "WAN_Frames" node, you know exactly which number to check first.

    How it works

    Trivial passthrough: the value widget outputs an INT unchanged. All the intelligence is in the widget definition - min 1, max 32768, and a step of 4 so the spin control only stops on 4, 8, 12, …, 81, …. That's it. Wire the int output into anything expecting an INT frame count.

    Input: value - frame count, default 81, step 4.

    Output: int - your number, ready for frame-count inputs on Wan samplers, video loaders, or latent setups.

    Install

    Standard RvTools install:

    • ComfyUI Manager → search "RvTools" → install ComfyUI-RvTools_v2 → restart.
    • Or: cd ComfyUI/custom_nodes && git clone https://github.com/r-vage/ComfyUI-RvTools_v2, then restart.

    No models, no downloads. (The pack's OpenCV/pilgram dependencies install anyway; this node needs nothing.)

    Gotchas

    The step-4 constraint only bites if you need an odd count - you genuinely can't type 25 here, since the widget snaps. For that case, feed the number through a plain integer primitive instead. Also remember Wan 2.2's two-pass architecture changes some settings versus 2.1, but frame count behavior is unchanged. And worth repeating for this pack: RvTools v2 is unmaintained (successor: ComfyUI_Eclipse), and old v1 workflow names won't map automatically - this one is a trivial remap if you hit it.

    If you're coming from AnimateDiff habits, 81 frames also happens to be a solid starting point for Wan looping experiments, which is why the pack's author built his whole video context around it.

    Category🫦 RvTools II/ Video

    Inputs (1)

    NameTypeDefaultDescription
    valueINT811–32768

    Outputs (1)

    NameTypeDescription
    intINT