Nodes/ComfyUI-Arrssenne/Switch from any 3-way (Arrssenne)
ComfyUI Node

Switch from any 3-way (Arrssenne)

Pick one branch, block the other two

By arrssenne·Created 2 months ago·Updated 25 days ago· 0
Switch from any 3-way (Arrssenne)
  • any
  • 1
  • 2
  • 3
select1

The three-way version of the same idea as Switch from any: one any-type input, one integer select, three outputs. It takes the CSwitchFromAny concept from crystools and stretches it from two outputs to three. Same killer detail, too - the two outputs you don't pick return an ExecutionBlocker instead of None, so those branches don't execute instead of crashing or running anyway. Output nodes like SaveImage will still fire on every run unless a branch is blocked, so this is what actually lets you turn a save path off from a single widget.

When do you reach for it? When you have exactly three mutually exclusive options. The author's own example is routing a face to Detailler / Faceswap / Saveas, but it's just as natural for picking among three checkpoints, three upscalers, or three save destinations. A three-way beats nesting two 2-way switches every time - one widget, one value to flip, no ladder of nested nodes to untangle when you come back to the workflow in a month.

The inputs that matter:

  • any - the value being routed. Any type works: IMAGE, LATENT, MODEL, CONDITIONING, STRING.
  • select - an INT from 1 to 3, default 1. This is the branch selector.

The outputs are named 1, 2, 3, and here's the subtle bit: you can rename them on the canvas (right-click → Rename) to something meaningful like "Face" / "Faceswap" / "Save". That rename is purely cosmetic - select still routes by index, not by name. Rename away, just don't expect to select "Faceswap" by its label. Under the hood it clamps select into 1–3, slots your value into that position, and sticks a blocker in the other two.

Gotchas are the same family as the 2-way. Because everything is * typed, ComfyUI won't flag a miswired connection - wrong types surface when you hit queue, not when you drag the wire. And the blocked branches really do not run: that's the point when they're blocked, and a mild trap when you forget to flip select back and the image you wanted saved just silently isn't. If you only ever need two options, grab the 2-way instead - an unused third output is just noise.

Install is identical, since it's the same pack:

cd ComfyUI/custom_nodes
git clone https://github.com/arrssenne/comfyui-arrssenne

then restart ComfyUI, or install through ComfyUI Manager under "ComfyUI-Arrssenne". No models to fetch, no heavy dependencies - just Pillow, which is already there. It's a genuinely personal pack with essentially no community footprint, so treat it as a utility you reach for when a workflow hands it to you, not something you build your setup around.

CategoryArrssenne/Switch

Inputs (2)

NameTypeDefaultDescription
any*
selectINT11–3

Outputs (3)

NameTypeDescription
1*
2*
3*