ComfyUI Node

RedNode Switch

The switch that doesn't run what you didn't choose

By RedNodeAI·Created 26 days ago·Updated 15 days ago· 0
RedNode Switch
  • input_1
  • input_2
  • input_3
  • input_4
  • input_5
  • input_6
  • input_7
  • input_8
  • selected
selected1
labels{}

The thing that matters about RedNode Switch is buried in its description: unchosen branches are never executed. That's the whole difference between this and doing it the fiddly way, and it's why you'd reach for it.

Here's the problem it solves. Say you have one workflow that can go three ways - a plain pass, a face-detailer branch, a 4K upscale branch. Stock ComfyUI runs everything upstream of the last node, so if you wire all three in and just try to choose between them, you're paying the VRAM and the seconds for all three. The usual workaround is bypassing groups by hand, which works until you forget to re-enable one and spend an hour wondering why the output looks wrong. RedNode Switch is the valve that replaces all of that: one node, up to eight inputs, and only the branch you actually pick ever runs.

How it works

The trick is lazy evaluation. Before running, ComfyUI asks the node what its inputs actually need to be produced - and RedNode Switch answers with only the chosen branch. Everything upstream of the other sockets is skipped entirely, as if it wasn't there. That's a genuine performance and VRAM win, not a cosmetic one: leave a big second model loader sitting on an unpicked branch and it never loads. The pack's whole control story is built on this idea - its README calls it "branches you did not pick never execute" - and the node even handles the awkward edge cases. Pick a branch that isn't connected and it passes the first live one instead, with a note in the console. Every branch wired in comes back empty (classic cause: it's BYPASSED or MUTED further upstream) and it raises an error that actually names that cause instead of failing confusingly two nodes later.

This is the named-selector shape of switch, not the fallback shape - worth knowing so you grab the right tool. rgthree's famous Any Switch passes the first non-null input with no selector at all; that's for "whichever branch is live, win." RedNode Switch is the opposite: you explicitly point it, which is what you want when you're keeping two or three pipeline variants in one file and flipping between them.

The inputs that matter

Only two widgets, and you'll mostly ignore both - the node's panel does the work:

  • selected - which branch to pass. The UI turns this into a dropdown of your names, and RedNode Control Panel (same pack) can drive it from one central switchboard.
  • labels - the branch names, stored as JSON. The panel edits this for you; you only touch it by hand if the panel's unavailable for some reason.

Then input_1 through input_8, and these take anything - latent, image, model, conditioning, you name it, because the sockets are wildcard ANY. Output is a single selected socket of whatever type you routed through it. Wire it into whatever would have consumed the branch.

Installing it

RedNode Switch ships in RedNode Studio, a 52-node pack with no pip dependencies. Either search "RedNode Studio" in ComfyUI Manager and install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/RedNodeAI/ComfyUI-RedNodeStudio.git

Restart ComfyUI and it appears under the RedNode category. Needs Python 3.10+; nothing else to download. One thing to know up front: the pack is PolyForm Noncommercial - free for personal and hobby use, commercial use needs the author's permission. For a routing node that's rarely a blocker, but it's the pack's actual license, so read it if you're building a product.

Common issues

  • "Nothing is connected to it" - genuinely empty. Wire branches into input_1, input_2… and pick one.
  • A branch that should be live keeps getting skipped - if it's fed through another lazy node (a switch into a switch), the resolution needs extra rounds. Settings > RedNode > Control has a "Switch resolve rounds" cap; raise it. The console tells you exactly which branch was given up on.
  • Confusing it with a fallback switch - this one has a selector and passes nothing unless a branch is actually live. If your graph depends on "first non-empty wins," that's rgthree's job, not this node's.

If you're running several generation styles or quality tiers from one workflow, this is the node that lets you keep them all wired without paying for the ones you aren't using.

CategoryRedNode/Control

Inputs (10)

NameTypeDefaultDescription
selectedSTRING1which branch to pass through. The panel turns this into a dropdown of your own names, so RedNode Control Panel can drive it.
labelsSTRING{}branch names, as JSON. The panel above edits this; editable by hand if the UI is unavailable.
input_1opt*branch 1 — connect anything; name it on the panel
input_2opt*branch 2 — connect anything; name it on the panel
input_3opt*branch 3 — connect anything; name it on the panel
input_4opt*branch 4 — connect anything; name it on the panel
input_5opt*branch 5 — connect anything; name it on the panel
input_6opt*branch 6 — connect anything; name it on the panel
input_7opt*branch 7 — connect anything; name it on the panel
input_8opt*branch 8 — connect anything; name it on the panel

Outputs (1)

NameTypeDescription
selected*