Mpi Any Switch 10
Ten slots, lazy-evaluated — for the workflow that outgrew five
- any_1
- any_2
- any_3
- any_4
- any_5
- any_6
- any_7
- any_8
- any_9
- any_10
- any
- index
Mpi Any Switch 10 is exactly what the name says: the five-slot Mpi Any Switch with room for ten. One INT select widget (1–10) picks which of the ten wildcard inputs any_1 through any_10 comes out the any output, and an index output echoes the selection. Nothing else changes - same mechanics, same lazy evaluation, double the slots.
The reason you'd reach for the ten-slot version is scale, and it's a scale that shows up more than you'd think. Model collections grow past five checkpoints. A prompt library wants to cycle through a dozen styles. A "pipeline stage" router with more than five branches is genuinely common once a workflow is doing real work. The cost of the extra slots is nothing - each input is optional, so you can use two slots or ten, and unwired ones just sit there.
The lazy detail matters more here, not less. Every input is declared lazy, and check_lazy_status requests only the selected slot, so ComfyUI skips execution of everything feeding the other nine. That's the whole point at ten slots: wire ten LoRA or model loaders, select slot 7, and the other nine don't run. With a smaller pack's non-lazy switch, you'd be paying to load all ten every single time and throwing nine away. That's the difference between a workflow that feels snappy and one that quietly double-loads VRAM.
Same shape as the five-slot version: select (INT, default 1, range 1–10, tooltip "Selection from 1 to 10"), ten optional * inputs, any + index outputs. If select points at an unwired slot, it returns an ExecutionBlocker and the branch no-ops rather than crashing. The index output is a faithful echo of select, so you can feed the number into downstream logic - say, a filename or a second switch - without reading it twice.
One honest thought: at ten slots, a switch node starts to become a wall of wires, which is exactly the legibility problem the KB's plumbing doc warns about. If you find yourself with ten things routed into one switch and you can't tell what's what at a glance, consider a packer to bundle related values (this pack's MpiPacker handles that) or naming groups. But for sheer "pick one of ten models at runtime" power, it's hard to beat. And if ten somehow isn't enough - you can chain switches, or look at the pack's packer/unpacker pair which bundles values instead of selecting them.
Install is pack-standard: ComfyUI Manager → search ComfyUi-MpiNodes → install, or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/MadPonyInteractive/ComfyUi-MpiNodes
Restart, and it's under MpiNodes/Logic. No dependencies beyond ComfyUI itself - pure Python utilities, the same pack that backs the Cubric Vision desktop app.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| select | INT | 11–10 | Selection from 1 to 10 Output index is also 1 to 10 |
| any_1opt | * | — | |
| any_2opt | * | — | |
| any_3opt | * | — | |
| any_4opt | * | — | |
| any_5opt | * | — | |
| any_6opt | * | — | |
| any_7opt | * | — | |
| any_8opt | * | — | |
| any_9opt | * | — | |
| any_10opt | * | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| any | * | — |
| index | INT | — |