Multi Model Switch
The node that picks which pipe is live
- selected_value
- selected_index
The whole reason MultiModel exists is "which of my several model setups runs this time?" MySwitchIndex is the router that answers it. Drop several ModelParamsPipe nodes into one graph, feed their pipes into this switch, and pick one - either explicitly by number or by "first connected wins." The chosen pipe then flows downstream into KSamplerPipe. That's the pack's multi-model A/B workflow in one wire.
Two modes, one intent
- firstActive - scans its inputs and returns the first one that isn't empty/None, plus its index. Perfect for fallback chains: wire your preferred model first, a fallback second, and it quietly uses whichever is actually connected.
- index - returns the input at the 1-based index you set. Explicit, predictable, the one you'll use most when you have a fixed lineup.
Outputs are selected_value (any type) and selected_index (INT). The "any type" is doing real work here - the node doesn't care whether it's switching pipes, models, images, or strings, so it'll happily route almost anything.
How it works
The inputs aren't a fixed list. The frontend adds and removes sockets dynamically - you'll see input_1, input_2, etc. appear as you connect things - and the Python handler collects whatever input_* kwargs arrive, sorts them, and picks per the mode. If you've used rgthree's Any Switch or Power Lora Loader, this will feel familiar: the pack even borrows the classic AnyType trick (credited to pythongssssss) and handles rgthree context objects when deciding if a value counts as "empty." It's the same family of pattern, done in-house.
Where people get tripped up
The index is 1-based, and selected_index returns 0 when nothing was found - not −1, not the last index. If you feed that output into something expecting a real position, guard against the 0 case. Also: the index-mode selector builds input_{index} from your widget, so if you set index 3 but never connected a third input, you get a None value and a 0 - silently, not an error. Check your wiring before you chase a phantom output.
The honest take
It works, and for a self-contained pack it's a fine switch. But if you're already running rgthree - and most people with multi-model workflows are - its Any Switch does the same job with a decade-more-battle-tested UI and a bigger ecosystem of context nodes around it. Reach for this one when you want to keep the pack self-contained, or when you specifically need the selected_index output, which rgthree's switch doesn't hand you the same way.
Installing
ComfyUI Manager → search MultiModel → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/FaberVS/MultiModel
Restart after. No extra dependencies, no model downloads. Like the rest of the pack, it shines as part of the pipe workflow rather than in isolation.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | 2 options: firstActive, index | |
| index | INT | 11–999 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| selected_value | * | — |
| selected_index | INT | — |