Nodes/Pipedream/πŸ’­ PD Switch
ComfyUI Node

πŸ’­ PD Switch

A/B two models (or two prompts) without rewiring your whole graph

By TheOnlyAaronΒ·Created 5 months agoΒ·Updated 5 months agoΒ· 4
πŸ’­ PD Switch
  • input_1
  • input_2
  • input_3
  • input_4
  • input_5
  • input_6
  • input_7
  • input_8
  • output
β—„modeβ–Ύβ–Ί
β—„select0β–Ί
β—„index0β–Ί

The classic way to compare two checkpoints or two prompts in ComfyUI is to build the whole pipeline twice and flip between them by dragging wires. It works; it's also how you delete the wrong wire and silently render with the wrong model. πŸ’­ PD Switch is the tidy alternative: it routes one of up to eight inputs to a single output, and the inputs are wildcard (*), so it works on models, prompts, latents, seeds, samplers - anything. You wire both candidates in and flip a single widget to choose which one flows through.

How it works

Two selection modes, one widget apart:

  • mode = manual - you pick with the select widget (0–7). This is the everyday mode: set up both inputs, flip select to swap, re-queue.
  • mode = value - the selection comes from the index input pin instead of a widget. Wire a number into it and the node routes dynamically, which is how you'd drive the switch from another node or an iteration loop.

The selected value appears on the single output output, same type as whatever you connected. The index is clamped to 0–7, so an out-of-range value just selects the last input instead of erroring - safe, if slightly forgiving.

The slick part is the input slots: the pack's JS extension auto-grows the list as you connect more inputs (2 to 8) and trims empty ones. You don't configure how many channels exist; you just keep plugging things in. It's the rare node that gets less confusing the more you use it.

The inputs that matter

  • mode - manual or value; the one setting you'll touch per workflow.
  • select - the manual index (0–7).
  • index - the value-mode index input.
  • input_1 … input_8 - the wildcard candidates. Only connect what you use; the JS keeps the rest out of your way.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/TheOnlyAaron/comfyui-pipedream

Restart ComfyUI, or install "Pipedream" via ComfyUI Manager. No dependencies, no models to download.

Gotchas

  • select is zero-indexed - input_1 is select 0, input_2 is select 1, and so on. The most common mistake is flipping to 1 expecting the second input and getting the third.
  • The wildcard output means ComfyUI can't type-check what you plug in. A mismatch shows up at execution time, not at connection time. That's the price of routing anything.
  • The node only routes - it doesn't remember or batch. If you want to run both candidates automatically, that's a job for πŸ’­ PD Wedge iterating over the selection, or just queue twice.
  • For the A/B-compare pattern specifically, pair it with a fixed seed: lock everything else, flip the switch, and the only thing that changes is what you're testing. That's the whole discipline, automated.
CategoryPipedream

Inputs (11)

NameTypeDefaultDescription
modeCOMBO2 options: manual, value
selectINT00–7β€”
indexoptINT00–7β€”
input_1opt*β€”
input_2opt*β€”
input_3opt*β€”
input_4opt*β€”
input_5opt*β€”
input_6opt*β€”
input_7opt*β€”
input_8opt*β€”

Outputs (1)

NameTypeDescription
output*β€”