Index Input Switch (Eager)
The index router that evaluates all 16 branches (use sparingly)
- values
- output
Nifty Index Input Switch (Eager) is the exact same router as the regular Index Input Switch - one index picks between up to 16 inputs - with one difference that changes how you use it: every input is evaluated, every run, regardless of which one the index selects.
Same inputs: index (1–16) and the auto-growing values list. Same output: output, carrying the value at the selected index. The entire difference is execution semantics.
When eager is the right call
The lazy version is the right default because it only runs the branch you pick. Eager exists for the cases where the unselected branches have to happen anyway:
- Side effects. One of the 16 branches writes a file, embeds metadata, or caches a result you need later - a lazy router would silently skip it.
- Warm-up and caching. Pre-encode the images you'll route to next, so the "switch" is instant when it happens.
- Validation. You want every branch exercised and error-checked even when not selected.
The cost is blunt: with 16 sampling paths wired in, eager will run all sixteen and blow through VRAM like it's nothing. This node is a scalpel, not a habit - if you catch yourself using eager "just in case," you almost certainly want the lazy one.
The Nifty pattern
This is the second eager variant in the pack's logic suite (the others being Input Switch Eager and Index Combo Switch Eager). The pairing is deliberate: every router gets both, so you never have to fake one with a workaround. The author's stance is basically "lazy by default, eager when you need the side effects" - and honestly, that's the right line.
Install
Standard Nifty Nodes install: ComfyUI Manager → search "Nifty Nodes", or
cd ComfyUI/custom_nodes
git clone https://github.com/Stibo/comfyui-nifty-nodes
Restart ComfyUI, keep ComfyUI current (v3 API). No extra dependencies. Only grab this over the lazy sibling when you know exactly why every branch must run.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| index | INT | 11–16 | Which value input to pass through (1–16). All inputs are evaluated regardless. |
| valuesopt | COMFY_AUTOGROW_V3 | Auto-growing list of inputs. All inputs are always evaluated regardless of the selected index. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | COMFY_MATCHTYPE_V3 | — |