ScarlotSoft Switch
Flip between two of anything — no rewiring, no second workflow
- On
- Off
- OUTPUT
ScarlotSoft Switch is an A/B valve for your workflow: two inputs, one output, and a checkbox that decides which input flows through. Check boolean_state on and you get whatever is on the On socket; uncheck it and you get whatever is on Off. That's the entire mechanism, and it's exactly as simple as it should be.
It's worth being precise about what kind of switch this is, because the ecosystem has two very different ones (the KB's plumbing doc draws the line). This is a manual switch - you flip it. It is not a fallback switch like rgthree's Any Switch, which automatically picks the first non-empty input. Different jobs: the fallback shape is for "whichever upstream branch is live wins"; the A/B shape is for keeping two things in one workflow and choosing between them by hand.
Where people actually use this: two checkpoint loaders and you want to A/B test models without rewiring; two prompts (a fast "test" prompt and a "final" prompt); two VAEs; two upscalers. Wire both branches in permanently, flip the checkbox, run. It's also the building block of a bigger idea - chain a couple of switches and you can select from more than two options, though the suite's Switch Pro exists if that's what you're really doing.
The type trick that makes it work: both inputs and the output are declared as the wildcard *, which means the node accepts anything - IMAGE, MODEL, CONDITIONING, STRING, you name it. That's the standard mechanism behind every switch node (the engine's ANY type), not something ScarlotSoft invented. If you leave one side unconnected, you get None through the output when that side is selected - which is sometimes a feature (an intentionally dead branch) and sometimes a bug you'll chase for ten minutes (forgot to connect Off).
Install
Standard for the suite. ComfyUI Manager → search "ScarlotSoft" → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/scarlotsoft/ComfyUI_ScarlotSoft
Restart. No dependencies beyond core ComfyUI.
The honest take
Core ComfyUI ships its own switch nodes these days, and rgthree's Any Switch is the canonical fallback flavor - so this isn't doing anything unprecedented. But it's clean, typed as *, and painless. The one thing that's genuinely ScarlotSoft is the presentation: the boolean_state renders as a toggle on the node, so switching is a click rather than a right-click menu dive. Keep the ecosystem's caution in mind, though - anything-anywhere routing nodes are exactly what the "please stop using" backlash was aimed at. Used to A/B two branches, this is fine and legible. Used as a way to avoid ever simplifying a workflow, it's how graphs become unreadable. Your call, but know the difference.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| boolean_state | BOOLEAN | true | — |
| Onopt | * | — | |
| Offopt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| OUTPUT | * | — |