Nodes/Comfyroll Studio/πŸ”€οΈ CR Pipe Switch
ComfyUI Node Runs on cloud

πŸ”€οΈ CR Pipe Switch

Pick between two Comfyroll pipe lines with one number

By Suzie1Β·Created 3 years agoΒ·Updated 2 years agoΒ· 1,296
πŸ”€οΈ CR Pipe Switch
  • pipe1
  • pipe2
  • PIPE_LINE
  • show_help
β—„Input1β–Ί

Comfyroll has its own small "pipe" family - CR Image Pipe In, CR Image Pipe Edit, CR Image Pipe Out, and this node, CR Pipe Switch. The idea behind a pipe, in general, is the same one other packs solve with "context" or bundle nodes: instead of routing several related wires (an image plus whatever settings travel with it) separately across your graph, you bundle them into a single PIPE_LINE connection and unpack it later. CR Pipe Switch is the branching piece of that system - it picks between two incoming pipes and passes the chosen one through.

What it's for

Once you're routing data through Comfyroll's pipe system, you'll eventually want a conditional branch: run configuration A or configuration B depending on some choice, without duplicating every downstream node for both paths. CR Pipe Switch does exactly that for pipe lines - feed it two pipes, tell it which one to use, and everything downstream of this node only ever sees the one you picked.

How it works

It's a simple index switch. You wire in pipe1 and pipe2, set Input to either 1 or 2, and the node outputs whichever pipe corresponds to that number. Nothing downstream needs to know both pipes exist - it just receives the one you selected.

Inputs and outputs that matter

  • Input (default 1, range 1–2) - which pipe to pass through. Set to 1 for pipe1, 2 for pipe2.
  • pipe1 / pipe2 (PIPE_LINE) - the two candidate pipes to switch between.

Output is a single PIPE_LINE - whichever of the two you selected - plus the standard show_help link to this node's wiki page. Worth noting this node is flagged as an output node in the pack's own schema even though it produces a data output; that's a Comfyroll implementation detail rather than something that changes how you use it.

How to install it

Install through ComfyUI Manager (search "Comfyroll Studio"), or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git

Restart ComfyUI. No models or extra dependencies for this node.

Common issues & troubleshooting

Nothing happens when you change Input. Make sure both pipe1 and pipe2 are actually connected to real upstream pipe-producing nodes (like CR Image Pipe In) - if one of the two is left unwired, switching to that index will fail or pass through nothing meaningful, since there's no pipe there to select.

Downstream node doesn't understand what came out of it. The output is a PIPE_LINE, Comfyroll's own bundled type - it needs to go into a node built to unpack that type (like CR Image Pipe Out or CR Image Pipe Edit), not directly into a node expecting a plain IMAGE, STRING, or MODEL. If you need the individual pieces back out, run the output through a pipe-unpacking node first.

Only ever using one of the two pipes. If your workflow doesn't actually need to branch, you don't need this node at all - it only earns its place when there's a genuine choice between two upstream configurations. For a single, static pipe with no branching, wire it straight through instead.

Whole pack fails to load. That's an install-level issue, not this node - delete the ComfyUI_Comfyroll_CustomNodes folder and re-clone rather than debugging a partial install.

Category🧩 Comfyroll Studio/✨ Essential/🎷 Pipe

Inputs (3)

NameTypeDefaultDescription
InputINT11–2β€”
pipe1PIPE_LINEβ€”
pipe2PIPE_LINEβ€”

Outputs (2)

NameTypeDescription
PIPE_LINEPIPE_LINEβ€”
show_helpSTRINGβ€”