Nodes/SAX Bridge/SAX Pipe Switcher
ComfyUI Node

SAX Pipe Switcher

Pick a pipe, expand it to sixteen outputs — SAX Pipe Switcher

By so16tm·Created 6 months ago·Updated 3 months ago· 0
SAX Pipe Switcher
  • pipe1
  • pipe2
  • pipe3
  • pipe4
  • pipe5
  • PIPE
  • MODEL
  • POS
  • NEG
  • LATENT
  • VAE
  • CLIP
  • IMAGE
  • SEED
  • STEPS
  • CFG
  • SAMPLER
  • SCHEDULER
  • DENOISE
  • OPTIONAL_SAMPLER
  • OPTIONAL_SIGMAS
slot0

SAX Pipe Switcher is the sibling of SAX Pipe with a routing valve bolted on. Where SAX Pipe lets you edit one pipe, this one takes up to five pipes, picks the one you want, and unpacks it into the full set of outputs - MODEL, POS, NEG, LATENT, VAE, CLIP, IMAGE, SEED, STEPS, CFG, SAMPLER, SCHEDULER, DENOISE, and the optional sampler/sigmas, same as SAX Pipe. If you've ever kept two model loaders in one workflow and dragged the wires across the canvas to swap them, this is the node that kills that ritual.

How it works

The selector is the slot integer, with a subtlety that trips people up once. Slots are 1-indexed - slot=1 means pipe1, up to slot=5. But slot=0 is the special "auto-scan" mode: it walks pipe1 through pipe5 in order and returns the first non-None pipe it finds. So the selection logic is:

  1. If slot is 1–5, that specific pipe wins, if it's connected.
  2. If the preferred slot is empty, or slot is 0 (or out of range), it falls back to scanning pipe1 → pipe5 and takes the first live one.
  3. If every pipe is None, it safely expands as an empty pipe rather than erroring.

That fallback behavior is what makes it forgiving: you can set slot=2 and wire nothing into pipe2, and it just moves on to whatever's actually connected. The docs frame it as "selects a valid Pipe," and the auto-scan is the same first-non-null pattern the plumbing layer loves - no selector widget, the graph decides.

When you'd use it

  • Two loaders (or two LoRA stacks) feeding one downstream sampler, switched with a single slot widget you can even convert to an input and drive from a Toggle Manager scene.
  • A quick-preview pipe vs. a full-quality pipe, with the switcher deciding which one expands into the KSampler wiring.
  • Anywhere you'd otherwise be bypassing whole loader subgraphs by hand.

Note it expands - that's the point. The PIPE output carries the selected bundle forward, but the other 15 outputs hand the individual pieces to ordinary ComfyUI nodes, so it doubles as the bridge from SAX pipes back into vanilla wiring.

Installing it

It's part of the SAX_Bridge pack, so the install is the pack install. ComfyUI Manager → "Install via Git URL" → https://github.com/so16tm/SAX_Bridge, or:

cd ComfyUI/custom_nodes
git clone https://github.com/so16tm/SAX_Bridge

Restart, and it's under SAX/Bridge/Pipe. No extra dependencies - pure routing.

Gotchas

Remember the 1-indexing; it's the only off-by-one in the pack and it bites exactly once. And decide whether you want deterministic selection (slot=2) or the auto-scan (slot=0): with auto-scan, priority is purely positional, so the pipe you think is winning might not be if a higher slot connects later. If you're comparing "with/without X" branches, the SAX Toggle Manager plus a Pipe Collector (first-non-None, no selector at all) is often the cleaner pairing than this node.

CategorySAX/Bridge/Pipe

Inputs (6)

NameTypeDefaultDescription
slotINT00–5優先するスロット番号(1 始まり)。0 の場合はスロット順にスキャン
pipe1optPIPE_LINE
pipe2optPIPE_LINE
pipe3optPIPE_LINE
pipe4optPIPE_LINE
pipe5optPIPE_LINE

Outputs (16)

NameTypeDescription
PIPEPIPE_LINE
MODELMODEL
POSCONDITIONING
NEGCONDITIONING
LATENTLATENT
VAEVAE
CLIPCLIP
IMAGEIMAGE
SEEDINT
STEPSINT
CFGFLOAT
SAMPLER*
SCHEDULER*
DENOISEFLOAT
OPTIONAL_SAMPLERSAMPLER
OPTIONAL_SIGMASSIGMAS