Nodes/ComfyUI-SimpleSwitch/Simple Switch (6 Inputs)
ComfyUI Node

Simple Switch (6 Inputs)

Pick the first input that's actually there

By boobkake22·Created 6 months ago·Updated 2 months ago· 0
Simple Switch (6 Inputs)
  • input01
  • input02
  • input03
  • input04
  • input05
  • input06
  • output

Every workflow ends up with the same problem eventually: you've got two or three branches that might produce a result, and you just want whichever one actually did. That's the entire job of SimpleSwitch. It takes up to six optional inputs - input01 through input06 - and returns the first one that isn't empty. Nothing to configure, no dropdown, no index number to dial. Wire things in the order you'd prefer and it hands you the first real value, in order, every single run.

You reach for it when you want a fallback chain. If a branch errors or comes back empty, the switch skips it and lets the next branch that produced something win. Feed it several candidate latents, a couple of reference images, or even a few models, and let it pick the first that exists. Because every socket is wildcard (*), it accepts most ComfyUI value types - image, latent, model, conditioning, you name it. That makes it the generalist of the pack; the three LATENT-typed siblings in the same repo exist for the cases where a wildcard wire gets fussy.

How it works

Under the hood it's a straight walk: check input01, return it if it isn't None; otherwise check input02, and so on down to input06. The interesting bit is inherited from its upstream: an empty model or CLIP context dictionary also counts as "empty." So if you feed it a model dict whose contents are all None, it treats that as a dead branch and moves on instead of forwarding a zombie object. That's genuinely useful for workflows where a loader can fail silently - the node notices before you do.

The inputs and outputs that matter:

  • input01input06 - all optional, all wildcard (*). Only the ones you connect are candidates. Priority is just the order: whichever is wired and non-empty wins.
  • output - a single wildcard output carrying the chosen value. Wire it wherever that value was headed.

Installing it

As painless as installs get. This pack is pure Python with zero dependencies - no requirements.txt, no pip step, no model files to download. Either search "ComfyUI-SimpleSwitch" in ComfyUI Manager's Install Custom Nodes menu, or:

cd ComfyUI/custom_nodes
git clone https://github.com/boobkake22/ComfyUI-SimpleSwitch.git

Restart ComfyUI and refresh the browser. That's the whole setup.

Where it comes from

This is a renamed, isolated port of EGRYQHNode from 11dogzi/Comfyui-ergouzi-Nodes, shipped by boobkake22 - an active r/comfyui regular who spends a lot of time answering other people's missing-node and video-workflow questions. The upstream license is carried along intact.

The trap to know about

SimpleSwitch is not a manual switch. There's no selector to flip - if you want "pick input #3 because I said so," you want an index-style switch like the ones Impact Pack and rgthree ship. This node is a first-available merge: it exists so a graph keeps running when a branch comes up empty, not so you can hand-pick. And because the output is wildcard, some strictly-typed downstream nodes will grumble about the untyped wire. That's the moment to reach for the LATENT-typed variants in this same pack - especially around LTX video and audio, where a subtype-blind pass-through can blow up at decode time.

CategorySimple Switch

Inputs (6)

NameTypeDefaultDescription
input01opt*
input02opt*
input03opt*
input04opt*
input05opt*
input06opt*

Outputs (1)

NameTypeDescription
output*