Lazy Fallback Switch
The ten-route fallback switch you'll actually use
- default
- value0
- value1
- value2
- value3
- value4
- value5
- value6
- value7
- value8
- value9
- output
If you've ever wanted an A/B switch without being limited to two positions, this is the version you'll end up keeping. Lazy Fallback Switch is the fixed-route half of the Lazy Fallback Switch pack: integer routing, a real fallback when the route you asked for isn't there, and it evaluates only the branch you select. No third-party dependencies, no frontend monkey-patching, no registry tricks - just a switch.
What it does
You set an index, and the node returns whatever is connected to value<index>. Unconnected route? It returns default. Unconnected default? You get None. Same deal as its Autogrow sibling, but the routes are fixed at value0 through value9 - the same ten-route range the other indexed switch nodes in the ecosystem use. An index outside 0–9, negative or double-digit, falls through to default. Ten routes is a lot more than most switch jobs need, so the ceiling rarely bites.
The behavior that actually matters is the laziness. Only the selected route gets evaluated; everything wired into the other nine routes is skipped by the scheduler. That's the whole point of the pack, and unlike the Autogrow variant, the fixed node doesn't depend on ComfyUI's newer Autogrow scheduling - which, at the time of writing, has a known bug where expanded Autogrow inputs lose their lazy metadata and connected routes may all execute (ComfyUI PR #15103). That's precisely why the README recommends this fixed node for general use: it keeps its laziness on today's ComfyUI, full stop.
Inputs and output
index- the selector; an integer, defaults to 0.default- used when the indexedvalueNinput isn't connected.value0…value9- the ten routes.
That's the entire surface. All the inputs and the output share one ComfyUI type (MATCHTYPE_V3 in the schema), so the node routes models, latents, conditionings, images - anything - without needing to know what it's carrying. The output, output, is that same type and feeds whatever sits downstream.
Where it fits
Reach for it when you have a small set of optional branches and a runtime value that picks between them: which model loader is live, whether a face-detailer pass runs, which conditioning path feeds the sampler. It's the selector-driven cousin of rgthree's Any Switch (which walks its inputs and picks the first non-null one on its own) - here you drive the choice explicitly. It was inspired by Akatz's Lazy Index Switch, with one meaningful difference: Akatz's requires the selected input to actually be connected, while this one falls through to default when it isn't. That fall-through is the behavior that stops a missing wire from erroring out your whole graph.
Installing and running
cd ComfyUI/custom_nodes
git clone https://github.com/SparknightLLC/ComfyUI-LazyFallbackSwitch.git
Restart ComfyUI, and it shows up under Sparknight/Logic. ComfyUI Manager users can search "Lazy Fallback Switch" instead. There are no Python dependencies and nothing to download - the pack is a couple of small V3-schema node classes plus a test suite, written against ComfyUI's newer comfy_api.latest authoring API rather than the old NODE_CLASS_MAPPINGS style. The one real requirement is a recent ComfyUI with V3 MatchType support (the pack declares 0.4.0+); on an older build it won't register.
Troubleshooting here is mostly "make sure you're current." If the node is missing after install, update ComfyUI and restart. If you came from the Autogrow variant, note that its all-branches-run bug is exactly what this fixed node avoids - on it, unselected routes stay idle.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| index | INT | 0 | Selects the matching valueN input. Any missing value uses default. |
| defaultopt | COMFY_MATCHTYPE_V3 | Used when the indexed value input is not connected. An unconnected default returns None. | |
| value0opt | COMFY_MATCHTYPE_V3 | — | |
| value1opt | COMFY_MATCHTYPE_V3 | — | |
| value2opt | COMFY_MATCHTYPE_V3 | — | |
| value3opt | COMFY_MATCHTYPE_V3 | — | |
| value4opt | COMFY_MATCHTYPE_V3 | — | |
| value5opt | COMFY_MATCHTYPE_V3 | — | |
| value6opt | COMFY_MATCHTYPE_V3 | — | |
| value7opt | COMFY_MATCHTYPE_V3 | — | |
| value8opt | COMFY_MATCHTYPE_V3 | — | |
| value9opt | COMFY_MATCHTYPE_V3 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | COMFY_MATCHTYPE_V3 | The selected indexed value, or default. |