Nodes/ComfyUI-Przewodo-Utils/WanVideoGenerationModeSelector
ComfyUI Node

WanVideoGenerationModeSelector

Set your Wan generation mode once, wire it everywhere — no drift, no retyping

By przewodo·Created about a year ago·Updated 4 months ago· 4
WanVideoGenerationModeSelector
    • Generation Mode
    generation_modeStart Image

    Let's be upfront: this is the thinnest node in the pack. It takes one dropdown and outputs the exact same string. If that sounds useless, you haven't hit the Wan workflow bug it exists to prevent.

    Why a string-passthrough node earns its place

    In przewodo's Wan video setup, the same generation-mode value has to be set on more than one node. The frame encoder (WanFirstLastFirstFrameToVideo) needs to know whether you're generating from a start image only, start→end, end→start, or start→end→start - because that determines where it anchors keyframes. And the decoder (WanVideoVaeDecode) needs to know the same mode, because it decides which padded frames to trim off the front and back of the decoded clip.

    Set those two by hand and you will eventually forget to flip one of them when you switch modes. Then you get a clip with a duplicated keyframe glued to the front, or the wrong end trimmed, and you'll spend twenty minutes debugging the wrong thing. This node is the fix: set the dropdown once, wire its Generation Mode output to both nodes, and they can never disagree.

    It also plays the same role as a shared control in a chunked workflow - one widget controlling the mode across several encode/decode stages, which is exactly the sort of spaghetti-reduction that keeps multi-chunk Wan graphs readable.

    How it works

    The single input is generation_mode, a dropdown with four choices:

    • Start Image
    • Start to End Image
    • End to Start Image
    • Start to End to Start Image

    The output is typed * (any), which is what lets it plug into whichever node expects the mode - the pack's nodes read it as a plain string. Behind the scenes the function just returns the selected string; there's no logic, no state, nothing to get wrong. That's the whole point: it's a named source of truth for a value you'd otherwise type in several places.

    One honest caveat: the node is a passthrough, so it only helps if you actually route both consumers through it. If you wire it to one node and type the mode by hand on the other, you've recreated the bug with extra steps.

    Install

    Same pack as the rest of the Wan utilities - przewodo/ComfyUI-Przewodo-Utils. ComfyUI Manager, search "ComfyUI-Przewodo-Utils," or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/przewodo/ComfyUI-Przewodo-Utils.git
    

    Restart ComfyUI and it's there under PrzewodoUtils/Wan. This node itself is dependency-free - no models, no packages - so if you're pulling it out of a shared workflow that's missing it, the install is just the pack, no extra downloads.

    It's a small node, and it's okay that it's small. Sometimes the highest-value thing in a workflow is the one wire that stops you from re-typing a value that needs to match.

    CategoryPrzewodoUtils/Wan

    Inputs (1)

    NameTypeDefaultDescription
    generation_modeCOMBOStart ImageVideo generation pattern: start only, end only, start->end, end->start, or start->end->start frame sequences

    Outputs (1)

    NameTypeDescription
    Generation Mode*