Nodes/ComfyUI-Bypass-Route-Tools/Bypass Route Controller
ComfyUI Node

Bypass Route Controller

Switch whole workflow branches from a single panel

By JuPillet·Created 2 months ago·Updated 2 months ago· 0
Bypass Route Controller
    • selected index
    active_index1
    invertedfalse

    You know the workflow. SD1.5 fast path on the left, SDXL nice path in the middle, Flux on the right, and every time you want to switch you right-click each node in the losing branch and hit Bypass, one by one, hoping you didn't miss one. The Bypass Route Controller exists to end that ritual.

    What it actually does

    It's a dashboard that lives on your canvas. You create named groups - one per branch, say "SD1.5", "SDXL", "Flux" - attach any number of nodes to each group, and click a row to make that branch active. Every node in the other groups gets bypassed automatically. Only one group is active at a time, and a group can hold a whole branch's worth of nodes: loaders, samplers, conditioning, the works. That's the upgrade over a flat list of checkboxes - a branch switches as a unit.

    How it works under the hood

    Most of the intelligence lives in the front-end JavaScript, not the Python. When you switch groups, the JS walks every managed node and sets node.mode = 4 on the losers and node.mode = 0 on the winners. That's not a custom bypass hack - mode 4 is ComfyUI's native bypass flag, the exact one a right-click → Bypass sets. So the result is identical to doing it by hand, just atomic and from one place. The backend Python is nearly a stub: it reports which group is active as an integer, and its IS_CHANGED override forces a re-evaluate after every switch so the graph stays honest.

    The bits you actually touch

    • "New Group" then "Add Node" per group - the picker is searchable by node title or ID.
    • Click the right side of a row to make that branch active. Click the name (or right-click → Rename) to edit it inline, no dialog.
    • Right-click a row for Move Up / Move Down / Remove group, and the on-screen order always matches the internal group order.

    Its single output matters: selected index, an INT holding the 1-based position of the active group, top to bottom. That's the handshake with its partner node - wire it into a Bypass Route Switcher's index input and your data routing flips in lockstep with the bypass state. Or feed it into any other switch or logic node that wants an integer.

    Worth knowing before you build with it

    • The two inputs, active_index and inverted, are hidden and saved with the workflow, so your selection survives save and reload.
    • inverted flips the logic: the active group gets bypassed and everything else stays active. Handy for an "all except this one" case, confusing if you toggle it by accident.
    • If the same node ends up in two groups it gets a ⚠, and it's kept active whenever its group is active - even in inverted mode - so a shared node never gets bypassed out from under the branch that needs it.
    • Removing a group restores its nodes to normal "Always Active" mode. Safe.
    • If clicking does nothing, the JS didn't load. Restart ComfyUI; a stale install with a missing js folder leaves the Python half with nothing to command.

    Install

    ComfyUI Manager (search "ComfyUI-Bypass-Route-Tools") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/JuPillet/ComfyUI-Bypass-Route-Tools
    

    Restart ComfyUI. That's it - no pip dependencies, no model downloads, nothing beyond stock ComfyUI APIs. You'll find it under Multi Route Tools in the node menu.

    The take

    This is the small, beginner-flavored take on what rgthree's Fast Groups Bypasser has done for years in the dominant pack. If you just need to mute groups, rgthree is the battle-tested default. What this pair adds is the data-routing companion - a bypass dashboard that actually talks to a switcher. For a shared multi-branch workflow, that's a genuinely nice combination, and the author clearly aimed it at people who'd rather not know what bypass mode even means.

    CategoryMulti Route Tools

    Inputs (2)

    NameTypeDefaultDescription
    active_indexINT11–64
    invertedBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    selected indexINT