Switch Text Node
A router that fans out, not picks
- source
- SOURCE_0
- SOURCE_1
- SOURCE_2
- SOURCE_3
- SOURCE_4
- SOURCE_5
- SOURCE_6
- SOURCE_7
- SOURCE_8
- SOURCE_9
The name is a lie on two counts. It's not text-only - the source input accepts any type - and it doesn't switch the way you probably expect. Most "switch" nodes in ComfyUI take many inputs and pass one through. This one takes one input and sends it to one of ten outputs, decided by an integer. That's a demultiplexer, and it's worth knowing what that shape buys you before you dismiss it.
How it works
Two inputs, ten outputs:
- condition (INT, 0–9) - picks which output the value lands on. Default 0.
- source (
*any type) - the value being routed.
The ten outputs are SOURCE_0 through SOURCE_9. Exactly one of them gets your source value; the other nine get None. So the logic is: outputs[condition] = source, everything else is empty.
That's the whole trick, and it's also the trap. Because the node always executes (its IS_CHANGED returns NaN, which tells ComfyUI to re-run it every time), a downstream node wired to SOURCE_3 only receives data when condition == 3. The other nine sockets in the node are the router's unused lanes - don't feed anything from them into a real node expecting a value, because None will break whatever it plugs into.
Why you'd reach for it
The honest use case is selective wiring: you want one value to reach exactly one of several downstream paths, and you're choosing which path at runtime. Say you have a batch of text prompts and you want prompt number N to feed the sampler while the rest stay dark - set condition to N and read only SOURCE_N.
The "Text" in the name and the default condition of 0 suggest this started life in a Roblox asset pipeline (the pack's home turf), routing a value to one of ten positions. For that, it does exactly what it says.
Where a different node is better
If you actually want the classic "one of several inputs" switch - pick between two prompts, two LoRA stacks, two samplers - this is the wrong shape. A proper Any Switch (rgthree's or the ones in WAS) takes many inputs and outputs one, which is what a multiplexer does and what most branching workflows need. The demultiplexer pattern here is niche; don't force it. And remember the ecosystem lesson from the "Anything Anywhere" controversy: an any-type output you wire carelessly becomes a workflow nobody can debug. Wire only the lane you mean to use.
Installing it
This is one of six nodes in the roblox-comfyui-nodes pack, so installing the pack installs this node.
cd ComfyUI/custom_nodes
git clone https://github.com/VertexStudio/roblox-comfyui-nodes
Then restart ComfyUI. In ComfyUI Manager, search for roblox-comfyui-nodes and install from there instead. No requirements.txt, no model files - nothing extra to download. You'll find the node under Custom Nodes.
Common issues
- Downstream node errors with None. You wired an output whose lane wasn't selected. Either change
condition, or check that the node you're feeding is reading the output that actually matches your condition. - "Nothing comes through no matter what I set." Make sure
conditionis an integer in 0–9. Out of range, and the node raises aValueErrorand your queue dies. - Expecting multi-input switching. Wrong tool - see above. This routes one source to one of ten lanes; it doesn't merge.
It's a tiny, single-purpose node - a personal-pipeline tool that got published with no README. Works as described, just keep its fan-out shape in mind and it won't bite you.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| condition | INT | 00–9 | — |
| source | * | — |
Outputs (10)
| Name | Type | Description |
|---|---|---|
| SOURCE_0 | * | — |
| SOURCE_1 | * | — |
| SOURCE_2 | * | — |
| SOURCE_3 | * | — |
| SOURCE_4 | * | — |
| SOURCE_5 | * | — |
| SOURCE_6 | * | — |
| SOURCE_7 | * | — |
| SOURCE_8 | * | — |
| SOURCE_9 | * | — |