VideoSelector
Two Video Branches, One Wire, No Dragging Cables Around
- primary
- secondary
- VIDEO
You've got two video paths in one graph - an LTX draft and a Wan refine, a fresh render and last night's keeper - and downstream something needs a video, whichever one is actually live this run. Without a node like this you do the ugly thing: unplug the wire, plug the other one in, hope you remember to put it back. VideoSelector is the boring little valve that fixes that. Two video sockets in, one out, and it picks.
What it actually does
The whole implementation is four lines, and that's the point. From the pack's toml_prompt/util.py:
def select(self, primary: Any = None, secondary: Any = None):
if primary is None:
return (secondary,)
return (primary,)
So it's a first-non-null fallback, not a switch. There's no boolean, no index, no dropdown - primary beats secondary by position, always. If nothing arrives on primary, secondary goes out instead. The author's own output tooltip reads "VIDEO not disabled," which tells you exactly what the author built it for: the plumbing taxonomy files this shape next to rgthree's Any Switch, the "walk the inputs and pass the first one that isn't empty" pattern, as opposed to an A/B switch you flip by hand. Here the graph is supposed to choose; you're not supposed to.
It also does no work on the data. In ComfyUI a VIDEO isn't a tensor sitting in a variable - it's the core InputImpl handle object you can see this same pack using in its LoadVideoReference node (InputImpl.VideoFromFile(ref), then video.get_components()). Selecting one is a pointer assignment. Zero VRAM, zero latency, no reason not to leave one in a big graph as a labelled tap point.
The sockets that matter
Two inputs, both optional, both typed VIDEO:
- primary - the one that wins when it's present. Wire your "main" branch here.
- secondary - the fallback. The backup path, the cached clip, the cheap draft.
Output is a single VIDEO, which goes into anything that consumes core video: a Save Video, a Create Video, Get Video Components, a video-to-video model node - whatever's next in your chain.
That's the entire node. Both inputs being optional is deliberate - it's what lets a socket arrive empty without ComfyUI screaming about a missing required input. Which means the practical recipe is: wire both branches, mute (Ctrl+M) the one you don't want this run, and the other one flows through. Bypassing (Ctrl+B) is less reliable here - bypass passes a same-typed input straight through, and a video loader has no VIDEO input to pass, so you get nothing out of it anyway.
Install
This ships inside morino-kumasan's comfyui-toml-prompt pack, alongside PromptDecode, PromptLoader and a matching selector for every other type (ImageSelector, LatentSelector, AudioSelector, StringSelector, IntSelector). No models, no downloads.
Easiest route is ComfyUI Manager, searching the pack title. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/morino-kumasan/comfyui-toml-prompt
Then restart ComfyUI. That's it - and I mean it, because requirements.txt in the repo is empty. The README still tells you to pip install -r .../requirements.txt and still refers to the project as comfyui-utils with an SSH clone URL; both are leftovers from before the rename. Don't go hunting for a dependency you don't have. (The README's real value is the PromptDecode TOML syntax reference, which is extensive and worth reading if you're here for the prompt side rather than the plumbing.)
Where people get burned
- Muting the branch and expecting a message. There isn't one. If both inputs are empty,
selectreturnsNoneand whatever's downstream blows up with its own complaint about a missing video. It's a router, not a validator. - Trying to feed it a VHS node. Video Helper Suite deals in
IMAGEbatches plusAUDIO, not the coreVIDEOtype, so the wire simply won't connect - and beginners spend ten minutes deciding the node is broken. For that world you want the pack'sImageSelectorinstead. Same idea,IMAGEtype. - Expecting it to convert. It won't turn a video into frames or a latent into pixels. One type,
VIDEO, in and out. - Assuming a community to fall back on. This is a genuinely obscure one-person pack - there's no tutorial, no issue thread, no Reddit discussion to search. The README and the source are your documentation, and the source is short enough to read in a sitting.
Reach for it when a graph has grown a second video path and you're tired of being the switch. Don't reach for it hoping it will clean up type conversions - that's a different node in the same drawer.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| primaryopt | VIDEO | — | |
| secondaryopt | VIDEO | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| VIDEO | VIDEO | VIDEO not disabled. |