π Dynamic Road
One Node, N Inputs, Pick the Lane by Index or Click
- selected_output
- text_out
- log_out
A plain A/B switch tops out at two inputs. π Dynamic Road is the version that doesn't: it accepts N universal inputs - as many as you care to connect - and passes through whichever one you select. If Boolean Switch is the single-pole switch, this is the rotary dial.
How it works. The input ports are dynamic: connect something to the first * input and more ports appear, up to 99 (selected_index maxes there). Each input gets a memo field (a label you can type, so it's input_3 in code but "Upscaled HQ" on screen) and a radio toggle. You pick the active lane two ways: visually, by clicking the radio button, or programmatically, by setting selected_index - an INT you can wire from another node. That second path is the interesting one: a PyCode Max node or a slider can drive the selection, turning Dynamic Road into a data-driven router.
Outputs. Three of them. selected_output is the value from the chosen lane, typed * so it passes images, latents, strings, whatever. text_out is the selected value as text - if it is a string, you get the string; if it's an image or latent, you get a warning line explaining it isn't text and what type it actually is. log_out is a debug log of which lane was active and what happened. The text and log outputs are what make this node work as a mini-debugger when you're not sure which branch is live.
Where people get burned: the selected_index fallback is subtle. If the index you ask for doesn't exist (you picked 4 but only connected 2 inputs), the node silently falls back to the first connected input. So a wrong index doesn't error - it just quietly routes to the wrong lane. Also, an unwired input isn't an option: this node picks among connected inputs only, and there's no "none" state. And in the code, the text output only carries real strings; anything else is a warning, not an error, so don't treat text_out as gospel for non-text values.
Install. ComfyUI Manager β search "Orion4D_MetaNode", or:
cd ComfyUI/custom_nodes
git clone https://github.com/orion4d/Orion4D_MetaNode
Restart ComfyUI; it's under Orion4D_MetaNode/UI Widgets/Dynamic Widgets. No extra dependencies.
Where it shines: keep three model loaders, five LoRA stacks, or a handful of prompt variants in one workflow and switch between them by index - including from another node. That's the difference between "rewire by hand" and "route by logic."
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| selected_index | INT | 11β99 | β |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| selected_output | * | β |
| text_out | STRING | β |
| log_out | STRING | β |