Nodes/DD-LogicNodes/DD Rerouter
ComfyUI Node

DD Rerouter

A switch that actually stops the other branch from running

By dumbdemon·Created 6 months ago·Updated a day ago· 0
DD Rerouter
  • source
  • Route A
  • Route B
switch_routetrue

Don't confuse this with ComfyUI's plain Reroute nodes. Those are visual helpers - a way to keep wires tidy without changing anything about execution. The DD Rerouter is something else entirely: it's a routing switch that takes a value on one input and sends it to one of two outputs, and it actively blocks the route you didn't pick so the downstream of that route never runs.

One source input (MatchType - adopt whatever you plug in), a switch_route boolean toggle labeled Route A / Route B (default: Route A), and two outputs named exactly that: Route A and Route B. When the toggle is on, source flows out Route A and Route B is blocked. Toggle it off, and the flow reverses.

The mechanism is the point

Under the hood the node uses ComfyUI's ExecutionBlocker on the unselected route. When switch_route is true, Route B's output is wrapped in a blocker - and a blocked output means ComfyUI doesn't just discard it, it refuses to execute anything downstream of it. A whole sampler chain hanging off Route B won't run at all. Flip the toggle and the same happens to Route A's chain. That's execution control, not wire cosmetics, and it's the reason this node exists.

This matters in the same way lazy getters do: if both of your routes are expensive pipelines and only one should ever run, a switch that evaluates both and throws one away is wasting your GPU. The DD Rerouter picks one route and starves the other. When you're juggling two heavyweight branches behind a single toggle, that's the behavior you actually want.

Why you'd reach for it

It's the cleanest way to build a "one of these two paths, not both" split in a workflow you'll share or reuse. Two upscale chains, two detailer passes, two model paths - send the source into the node, wire each chain to an output, and the toggle decides which one lives. It also reads clearly on the canvas: the A/B labels on the toggle make the intent visible at a glance, which a numeric switch index never does.

There's a bit of pack-history context here too. The DD-LogicNodes author built this on ComfyUI's newer extension API at a moment when the ecosystem was grumbling about the old guard's reroute nodes breaking under Nodes 2.0. This isn't a replacement for those - it's a different tool with the same name family. If you just want to tidy wires, use a core Reroute node. If you want to route execution, this is the one.

What to watch

Both outputs share the source's type, so Route A and Route B must consume the same type - you can't send an image down one and a string down the other. And remember the blocker behavior cuts both ways: whichever route you don't pick is fully dead, so don't wire something you need on both sides into the unselected route expecting it to still run. That's not a bug; it's the feature.

Installing

The shared DD-LogicNodes install: ComfyUI Manager → search DD-LogicNodes → Install → restart, or git clone https://github.com/dumbdemon/DD_LogicNodes into ComfyUI/custom_nodes. No dependencies, no models. It needs a current-enough ComfyUI for the newer extension API - on older builds you won't find it in the menu, and updating ComfyUI is the fix.

CategoryDD Logic Nodes/Helper Nodes

Inputs (2)

NameTypeDefaultDescription
sourceCOMFY_MATCHTYPE_V3
switch_routeBOOLEANtrue

Outputs (2)

NameTypeDescription
Route ACOMFY_MATCHTYPE_V3
Route BCOMFY_MATCHTYPE_V3