Auto Exclusive Switch
The routing node you drive with Ctrl+B, not a dropdown
- input_a
- input_b
- output
What it actually does
You have two branches that end in the same kind of data - two CONDITIONING paths, two upscalers, two model families - and you want exactly one of them live. The usual ComfyUI answer is a switch node with a widget you have to remember to flip. Auto Exclusive Switch deletes the widget: you bypass a branch and the node notices.
That sounds like a small thing until you've built a workflow where the selector and the bypassed group drift out of sync and you spend twenty minutes wondering why your negative prompt is doing nothing. This node refuses to let that happen.
One mechanism note before the wiring: this is a plumbing node. It touches no pixels. input_a and input_b are declared as the wildcard type *, so the same node routes images, masks, models, latents, strings - anything, as long as both sides are the same thing. If you've read about ComfyUI's "*" escape hatch, this is that trick in its most useful form.
How it works under the hood
The inputs are declared lazy, and the node implements check_lazy_status, which returns only the branch it decided to use. That's the difference between this and a plain switch that evaluates both sides: the ignored branch is never executed, so a half-finished second sampler sitting on the dead side doesn't cost you a run.
The decision comes from active_inputs, an integer you'll see in the schema but almost never touch. It's a bitmask - 1 is A, 2 is B, 3 is both, -1 means "work it out." The frontend recomputes it from your graph every time the workflow serializes, and the pack installs a prompt handler on the ComfyUI server that re-derives the flags from the workflow before validation, so a stale flag from a cached tab can't win. There's a third check against the actually-submitted connections, which is what makes KJNodes Get/Set routes and saved subgraph output wires behave.
If it can't find exactly one live branch, it raises instead of guessing. The error is unusually good - it reports enabled-state, the node id, and the frontend/workflow/submitted flags side by side, which is more than most custom nodes give you.
Inputs and outputs that matter
input_aandinput_b- your two alternatives. Same data type on both sides. That's the whole configuration.output- the one live branch, forwarding whatever type it received.
active_inputs exists for API prompts and for the frontend to write; leave it alone.
Wiring it
Drop it wherever a single input needs one of two sources. In the pack's own example, two Auto Exclusive Switch nodes route positive and negative conditioning into WebUI Inpaint, one per side, with the two text-encoder paths grouped so a group preset can flip both at once. That's the intended pairing: this node plus Group Bypass Presets (also in this pack, frontend-only) gives you a workflow that swaps between text-to-image and inpainting setups in one click, with no switch widgets to maintain.
To flip a branch by hand, select the nodes and hit Ctrl+B to bypass, or Ctrl+M to mute. Bypass is the one you want: a bypassed branch's type still passes through, so ComfyUI's validation stays quiet and the switch sees it as disabled.
Install
Same pack, same two commands:
cd ComfyUI/custom_nodes
git clone https://github.com/adachi0130/Adachi-Inpaint-Workbench.git
Restart ComfyUI completely, then hard-refresh the browser (Ctrl+F5, Cmd+Shift+R on macOS). Search "Adachi" in the node menu. There are no model downloads and no extra Python packages - requirements.txt is numpy, Pillow, torch, all of which ComfyUI already has. On Windows there's an install.ps1 that takes -ComfyUIPath, backs up an existing copy to user/adachi-workbench-backups/, and does not restart the server for you.
Where people get burned
Both enabled is an error, on purpose. The author made a deliberate call that silence would be worse than a red node. If you habitually leave both branches enabled "just in case," you'll meet that error. Bypass one.
Keep the selector outside the groups it controls. That's the README's own troubleshooting advice, and it matters: if the switch lives inside the group that a preset bypasses, the preset disables the thing that was supposed to be doing the deciding.
Get/Set routes confuse the picture. Both KJNodes Gets can stay enabled, and that's fine - bypassing the corresponding Set, or the source feeding it, is what disables the branch. Look at the real source, not just the visible Get node, before you conclude the node is broken. And if some integration still drops a subgraph output, moving the CLIP encoder outside that subgraph is the practical workaround the author suggests.
One honest caveat: this pack is new and small, so there's no community folklore to lean on yet. What you get instead is a genuinely unusual amount of testing - the repo ships CPU regression tests for the routing cases specifically (tests/test_exclusive_switch.py, tests/test_exclusive_routes.mjs), and the verification log documents real queue runs for every enabled-state combination. For a node whose entire job is "which branch won," that's the right thing to have tested.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| input_aopt | * | First branch; bypass either this branch or input_b. | |
| input_bopt | * | Second branch; exactly one branch must remain enabled. | |
| active_inputsopt | INT | -1-1–3 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | * | — |