Nodes/comfyui-darkil-nodes/Any Switch [darkilNodes]
ComfyUI Node

Any Switch [darkilNodes]

Stop re-wiring your workflow every time you want to A/B test something

By pytraveler·Created 8 months ago·Updated 23 days ago· 9
Any Switch [darkilNodes]
  • any_1
  • value

If you've ever wanted to test upscaler A against upscaler B without dragging wires around a graph the size of a small country, this is the node. Any Switch [darkilNodes] is a pass-through switch: you stack a bunch of inputs of any type, and the first one that's both connected and enabled flows out on value. It's a direct spiritual cousin of rgthree's famous Any Switch - the README says so itself - with the same tolerance, meaning it never blows up when nothing is connected.

The classic use is A/B testing. Wire two (or five) different models, LoRA stacks, or upscalers into the slots, then flip between them from the node instead of re-plumbing the graph. Because each input has its own checkbox in the right column, you can also "mute" an input without disconnecting it - handy when you want to keep a broken experimental branch wired up but out of the path.

How it works

The magic is in the dynamic inputs. You start with any_1, and a new slot (any_2, any_3, …) appears as soon as the last one is filled - the extra empty slots get trimmed automatically, so you never end up with a wall of dead sockets. At run time the node scans the inputs top to bottom and returns the first one that is enabled in its checkbox AND connected.

The detail that keeps people honest: it checks connected, not truthy. A falsy-but-valid value like 0 or an empty string still passes through, because an unconnected slot arrives as None and that's the only thing that gets skipped. If nothing qualifies at all, the node outputs None instead of raising - that's the "tolerant" bit, and it's what makes this safe to drop into a workflow you're still building.

The inputs that matter

Honestly, there's nothing to configure. The one real input is:

  • any_1 (and its dynamically grown siblings) - ANY type, so a single node can switch between an image, a string, a conditioning, whatever.

And one output:

  • value (ANY) - the winner, forwarded untouched.

That's the whole node. No widgets beyond the per-input checkboxes, no mode dropdowns. If you know rgthree's Any Switch, you know this.

Install

It ships inside comfyui-darkil-nodes, which is a zero-dependency pack - no Python packages, no model downloads, just a folder of nodes. Install the pack once:

  • ComfyUI Manager: search "darkil" (or "comfyui-darkil-nodes") and hit install, or
  • manually:
cd ComfyUI/custom_nodes
git clone https://github.com/pytraveler/comfyui-darkil-nodes.git

Then restart ComfyUI. The node shows up under darkilNodes/logic in the node menu.

Things to know

This pack is new - v0.3.0 landed around July 2026 and its only community footprint so far is the author's own release posts on r/comfyui. That's not a red flag, but it does mean this switch is unproven in the wild compared to rgthree's, which has been in thousands of workflows for years. If you need exactly one switch and want the boring, battle-tested option, use rgthree's. If you're already pulling this pack in for Show Any or the text tools, grab this one too - it's the same mechanism, and the checkbox-to-disable-without-disconnecting trick is genuinely nicer than the alternatives.

One thing that trips people up: the enable checkboxes live in the right column of the node, not in the widget area - easy to miss when you've got the node collapsed. If a slot isn't passing through when you expect it to, that's the first place to look.

CategorydarkilNodes/logic

Inputs (1)

NameTypeDefaultDescription
any_1opt*

Outputs (1)

NameTypeDescription
value*