Nodes/Auto Switch (ANY) by Steve Lasmin/Auto Switch (ANY) by Steve Lasmin
ComfyUI Node

Auto Switch (ANY) by Steve Lasmin

A two-input switch you flip by bypassing, not by touching a dropdown

By Eklipsis·Created 4 months ago·Updated 4 months ago· 0
Auto Switch (ANY) by Steve Lasmin
  • input_a
  • input_b
  • output

Auto Switch (ANY) is a 2×1 gate that picks which of two upstream signals gets through - and the way you flip it is to bypass one of them. No dropdown, no button, no mode switch. You connect input A to one branch of your workflow, input B to another, then right-click-bypass whichever one you don't want running right now. The node sees exactly one live signal and passes it through.

That's the whole trick, and it's genuinely handy. If you keep two checkpoint loaders, two samplers, or two conditioning pipelines around in the same graph (say a normal Flux pass and a turbo one), you'd normally have to either rebuild the wiring each time or wire in a manual switch node and remember which option it's set to. Here the bypass state is the switch - which means it travels with the workflow file. Save a version with branch B bypassed and you've saved a different configuration, no hidden state.

It sits in the same corner of the ecosystem as the routing utilities from rgthree-comfy, though with a different philosophy: rgthree's switches are manual widgets you click, this one auto-detects and errors loudly when you're ambiguous. Under the hood (auto_switch_any.py) it's almost embarrassingly small: both inputs are optional universal (*) types, and select() checks which one isn't None. Exactly one active gets passed out; anything else is an error.

Inputs and outputs - there are only three, and you only set two of them:

  • input_a / input_b - both universal * sockets. MODEL, CLIP, VAE, LATENT, IMAGE, CONDITIONING, STRING, INT, FLOAT, whatever. Because they're marked forceInput, you can't type a value into them; it's a pure pass-through.
  • output - universal, dynamically re-typed by the bundled JS so the slot label shows whatever type you actually connected. Wiring it into your downstream node just works.

Install

It's a one-file node with zero dependencies - pyproject.toml lists an empty dependencies, no model downloads, nothing heavy. The README's own recommended path is ComfyUI Manager → Install via Git URL with https://github.com/Eklipsis/auto_switch_any_by_steve_lasmin, or the plain manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/Eklipsis/auto_switch_any_by_steve_lasmin

Restart ComfyUI, then find it under Add Node → utils/routing → Auto Switch (ANY) by Steve Lasmin.

Troubleshooting

The two failure modes are built into the design and the error messages tell you exactly what to do:

  • COLLISION - both inputs are active. You bypassed nothing. Bypass one upstream branch (or disconnect it) and rerun.
  • DEAD AIR - no active input. Both are bypassed or unconnected. Exactly one must carry data.

Where people tend to get tripped up: the "switch" is the bypass, so toggling works only if you leave both branches wired and flip the bypass on one. If you disconnect a branch entirely instead of bypassing it, that's just DEAD AIR waiting to happen. And note this isn't a runtime selector - you can't change which branch runs mid-generation. You pick before you queue.

One honest caveat: this is an obscure little pack. Zero Reddit footprint for the node or the author as of writing, so there's no community war-stories section to lean on - what you see above is the whole surface. Also worth knowing before you vendor it: the license is not permissive. Free to use personally or commercially, but no modification, redistribution, or derivative works without the author's written permission. Fine for running in your own graph, a non-starter for shipping a fork of it. For a bypass-toggled two-way gate it does exactly one job, does it with universal typing, and never calls an API or downloads a model - if the niche fits, it's hard to complain.

Categoryutils/routing

Inputs (2)

NameTypeDefaultDescription
input_aopt*
input_bopt*

Outputs (1)

NameTypeDescription
output*