Nodes/ComfyUI_Eclipse/Any Dual-Switch
ComfyUI Node

Any Dual-Switch

A two-position valve for any wire in your graph

By r-vageΒ·Created 10 months agoΒ·Updated a day agoΒ· 31
Any Dual-Switch
  • input1
  • input2
  • *
β—„Input1β–Ί

Any Dual-Switch is the A/B switch of ComfyUI_Eclipse's router family: two inputs, one selector, one output. You pick which of the two inputs flows through, and it passes that value along untouched. The "Any" in the name is the whole point - the sockets are wildcard, so it routes a model, a latent, an image, a string, or a pipe with equal indifference. It doesn't care what it's carrying.

This is the node you reach for when a workflow has two interchangeable sources and you want to flip between them without rewiring. Two checkpoint loaders in one graph, A/B the outputs. A video and an image source for the same consumer, switch between them. It's the manual routing valve from the plumbing layer: you choose, the graph doesn't decide for you.

How it works

There's a single Input integer (1 or 2, default 1) that selects input1 or input2. Both inputs are optional and wildcard-typed; the output is the same wildcard type. If the selected input is disconnected or None, the node emits None rather than erroring, so downstream optional inputs just see nothing - the convention that makes this stuff composable.

A couple of useful details from the source:

  • The selector is just an INT widget, so you can drive it from another node - a Boolean wired in, a counter, anything that resolves to 1 or 2.
  • It handles lists correctly: if the selected input arrives as an empty list or a list of Nones, it still passes None instead of choking.

Where it fits

ComfyUI caches aggressively and only re-runs nodes whose inputs changed, so an A/B switch is cheap: flip it, and only the branch you select actually executes on the next run. That makes it ideal for the "one workflow, two configurations" pattern - swap the model, keep the graph.

The honest caveat: for two inputs this is the right tool, but the moment you have three or more options, reach for the Eclipse Any Multi-Switch instead. That one is a fallback switch - it walks its inputs and returns the first non-empty one, so the graph picks for you based on what's connected.

Installing it

It ships in ComfyUI_Eclipse, so install the pack once:

cd ComfyUI/custom_nodes
git clone https://github.com/r-vage/ComfyUI_Eclipse

Then restart ComfyUI (or Manager β†’ search "ComfyUI Eclipse"). No extra dependencies - it's pure routing logic.

Gotchas

One pack-wide note, because it bites everyone upgrading: ComfyUI_Eclipse used to be RvTools, and v4.0.0 removed all legacy nodes. Old workflows load blank unless you run the Workflow Migration Tool node (or python tools/migrate_workflow.py <workflow.json>) to rewrite the old IDs with a backup.

And one behavior worth remembering: Any Dual-Switch passes None through when the unselected input is the one you wanted. If your output suddenly "goes dark," check which position the selector is in before you blame anything downstream.

CategoryπŸŒ’ Eclipse/ Router

Inputs (3)

NameTypeDefaultDescription
InputINT11–2Select which input to output (1 or 2).
input1optCOMFY_MATCHTYPE_V3First input (any type).
input2optCOMFY_MATCHTYPE_V3Second input (any type).

Outputs (1)

NameTypeDescription
*COMFY_MATCHTYPE_V3The selected output.