Switch Lazy (Texturaizer)
One of ten inputs, chosen by index — and only that one gets computed
- input1
- input2
- input3
- input4
- input5
- input6
- input7
- input8
- input9
- input10
- selected
- index
Lazy evaluation is one of ComfyUI's underappreciated superpowers: a node can tell the executor "don't bother running everything upstream of me - only run the one input I'm actually going to use." Switch Lazy (Texturaizer) is a 1-to-10 selector built on exactly that. You feed it up to ten inputs and an index, and it outputs the one you picked - while making sure only that input's upstream branch ever executes.
Context: Texturaizer is a paid Blender addon by Luke Kratsios (LatentSpaceDirective); these nodes are its free ComfyUI companion pack. This switch is a pack utility, useful well beyond the Blender workflow.
Inputs and outputs
index(INT, 1–10, default 1) - which input to select, per the author's tooltip.input1throughinput10(all*) - the candidates. Any type; wildcard.- Outputs:
selected(*) - the chosen input - andindex(INT) - an echo of the selector, handy for logging or driving another node.
How the laziness works
This is the part worth understanding, because it's what separates this from a naive switch. The node declares every input as lazy and implements check_lazy_status(): it reads the index, then tells ComfyUI "only evaluate inputN." So if input 3 is a full upscale chain and inputs 1–2 are trivial, picking 3 runs the upscale and skips nothing extra; picking 1 doesn't waste GPU on the upscale branch. In the Texturaizer context that's meaningful - multi-pass scenes can have expensive per-object branches, and a lazy switch is how one graph serves ten objects without doing ten times the work.
execute() then returns the selected value (or None and the index, if the selected input was empty).
Where it shines
Any time you're fanning out choices. Common patterns: pick between several checkpoint paths, several conditioning setups, or several image sources based on an index coming from Get Sampler Data or a scene property. It's also the natural "middle option" of the pack's switch trio - Switch Any for a boolean yes/no, Switch Smart for matching a key against trigger patterns, this one for a plain number.
Install
Pack-level, once:
cd ComfyUI/custom_nodes
git clone https://github.com/LatentSpaceDirective/ComfyUI-Texturaizer
or ComfyUI Manager → search "Texturaizer" → Install → restart. No extra dependencies, no models.
The caveat
The laziness only saves work when the input is a whole upstream branch - and that only holds if you're actually connecting things through this node rather than wiring them in parallel elsewhere. Also, the index is 1-based: input 0 isn't a thing, and an out-of-range value quietly resolves to... whatever's selected, so keep your index sourced from something that stays in 1–10. If you need matching semantics instead of a raw number (like "pick the branch whose name starts with AYS"), that's Switch Smart's job.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| index | INT | 11–10 | Select which input to output (1-10). |
| input1opt | * | — | |
| input2opt | * | — | |
| input3opt | * | — | |
| input4opt | * | — | |
| input5opt | * | — | |
| input6opt | * | — | |
| input7opt | * | — | |
| input8opt | * | — | |
| input9opt | * | — | |
| input10opt | * | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| selected | * | — |
| index | INT | — |