Nodes/ControlAltAI Nodes/Switch (Three Way)
ComfyUI Node

Switch (Three Way)

Pick one of three branches from a single setting

By gseth·Created 2 years ago·Updated about a year ago· 209
Switch (Three Way)
  • input_1
  • input_2
  • input_3
  • output
selection_setting1

Same idea as the pack's Two Way switch, one more lane. Switch (Three Way) routes one of three inputs to its output, so you can build a workflow that chooses between three paths - say three different upscale models, three sampler configs, or three checkpoints - without duplicating half your graph. When two branches aren't enough, this is the reach.

Like its two-way sibling, it's type-agnostic: the inputs and output are wildcards, so it'll pass images, latents, models, conditioning, anything, as long as the output feeds something compatible. That's the ControlAltAI switch signature - one switch node for every wire type instead of a different switch per type.

How it works

Wire up to three inputs (input_1, input_2, input_3), set selection_setting to 1, 2, or 3, and the matching input passes through to output. Nothing clever - a clean three-way selector.

The natural pairing is Integer Settings Advanced, the pack's three-state companion node. It exposes three toggles and outputs 1, 2, or 3 depending on which one is enabled, and that value drops straight into selection_setting. So instead of typing a number, you flip whichever of three toggles you want and the whole branch follows.

The inputs and outputs that matter

  • selection_setting - 1, 2, or 3. Drive it from Integer Settings Advanced for toggle-based control.
  • input_1 / input_2 / input_3 - the three candidates, all optional so you only wire what you use.
  • output - the selected input, passed through unchanged.

How to install it

ComfyUI Manager → search ControlAltAI Nodes → install → restart, or clone it:

cd ComfyUI/custom_nodes
git clone https://github.com/gseth/ControlAltAI-Nodes

and restart. No models, no heavy deps - it's a router.

Common issues

The wildcard type means ComfyUI resolves the type from what's connected, so make sure the branch you're selecting is actually wired and the output has a destination. Setting selection_setting to a lane you never connected just gives you an empty output - check that the selected input exists.

Straight talk: it's a switch. If you only ever need two options, use the Two Way switch and keep the graph simpler. Reach for Three Way when you genuinely have three mutually-exclusive paths, and let Integer Settings Advanced do the choosing so you're flipping a labeled toggle instead of remembering which number means which branch.

CategoryControlAltAI Nodes/Logic

Inputs (4)

NameTypeDefaultDescription
selection_settingINT11–3
input_1opt*
input_2opt*
input_3opt*

Outputs (1)

NameTypeDescription
output*