Simple Selector (Switch)
A dropdown switch that also tells you which option it picked
- source_a
- source_b
- source_c
- source_d
- source_e
- output
- label
Simple Selector (Switch) (class SimpleSelectorSwitch) is the no-philosophy member of the Lenient Switch pack. No truthiness tests, no per-slot conditions, no "first truthy wins." You get a plain dropdown (none / A / B / C / D / E), five sources, and whatever you select gets forwarded. It's what you drop in when you just want to swap between two or three things without rewiring the graph.
The genuinely clever bit is small and easy to miss: every slot carries a free-form label_a … label_e text field - a memo, "SDXL base", "Flux dev", whatever - and the node re-emits the selected slot's label on a second label STRING output. The labels never influence flow. They're for you. Feed that output into a text-concat node and your saved filename says which variant actually ran. Stuff it into PNG metadata and you can tell which of your five prompts made this image at a glance. A switch that doubles as a tiny audit trail.
The inputs that matter
select- the dropdown. The whole control surface.label_a…label_e- per-slot memos, re-emitted onlabelfor the chosen slot.block_on_none_selected- whenselectisnone, emit anExecutionBlockeron both outputs so downstream nodes are skipped instead of receivingNone. Default off.bypass_unselected- lazy evaluation: only the selected slot's source actually runs, so the other four upstream chains never execute. That's a big deal when one of those chains is expensive. Note it's not a visual bypass - nothing greys out, the nodes just don't run.
Outputs: output (any) and label (STRING).
Two behaviors that bite people
- Selecting a slot whose
source_Xisn't connected returnsNone- it does not block. Onlyselect = nonewithblock_on_none_selectedon triggers the blocker. If your downstream breaks on aNone, check which slot you selected, not the block toggle. - With
bypass_unselectedon andselect = none, nothing runs - every source is skipped, not just the unselected ones.
Why you'd reach for it
A/B testing. Two checkpoints, two samplers, two CLIPs - wire each pair into source_a / source_b, flip the dropdown, run. No deleting and re-plugging wires every time you want to compare. It composes nicely with the pack's main LenientSwitch too: manual picks here for the things you decide by hand, automatic gating there for the things the graph should decide for itself.
Install
This node ships zero JavaScript - pure Python. Same trivial install as the rest of the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/id-fa/ComfyUI-Lenient-Switch lenient-switch
Restart ComfyUI, and it appears under Lenient Switch in the node menu. No dependencies, no models to download. (ComfyUI Manager search "Lenient Switch" works too.)
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| select | COMBO | none | Pick which source to forward. 'none' forwards nothing (see block_on_none_selected). |
| label_a | STRING | Free-form per-slot memo (e.g. 'SDXL base'). Not used by the node. | |
| label_b | STRING | Free-form per-slot memo (e.g. 'SDXL base'). Not used by the node. | |
| label_c | STRING | Free-form per-slot memo (e.g. 'SDXL base'). Not used by the node. | |
| label_d | STRING | Free-form per-slot memo (e.g. 'SDXL base'). Not used by the node. | |
| label_e | STRING | Free-form per-slot memo (e.g. 'SDXL base'). Not used by the node. | |
| block_on_none_selected | BOOLEAN | false | When 'none' is selected, emit ExecutionBlocker so downstream nodes are skipped instead of receiving None. |
| bypass_unselected | BOOLEAN | false | When ON, only the selected slot's source_X is evaluated; the upstream chains feeding the other (and, with 'none', all) sources do not run (lazy evaluation). Note: nodes are not visually bypassed like rgthree; they simply do not execute. |
| source_aopt | * | Source for slot A (any type). | |
| source_bopt | * | Source for slot B (any type). | |
| source_copt | * | Source for slot C (any type). | |
| source_dopt | * | Source for slot D (any type). | |
| source_eopt | * | Source for slot E (any type). |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| output | * | — |
| label | STRING | — |