Bypass Switch
Flip a whole subgraph to Bypass from one boolean
- enabled
The name oversells it a little. This is not an A/B switch that reroutes data between two inputs - it's a frontend-driven control that flips the Bypass/Always state of the nodes directly wired into it. Set enabled to false and those nodes go Bypass (skipped, exactly like you muted them by hand); set it true and they run Always. Think of it as a group mute you can drive from a variable instead of your mouse.
Why it exists
It's the pack's answer to a real annoyance in batched runs. In the double-sampler workflow, some cards in your prompt library want a second (hires-fix style) pass and some don't. Toggling that pass by hand for every job is misery. The Bypass Switch exists so the decision comes from the data: when a JSON card carries double-sample fields, the switch follows that and lets the second-pass subgraph run; when it doesn't, the whole thing gets bypassed. One switch per workflow for now, which the README says plainly - worth planning around if you want several independently-switchable regions.
Inputs and outputs
Just one of each, and they're simple:
enabled(BOOLEAN, default false) - the switch itself. False means the connected nodes are set to Bypass; true means Always. Defaulting to false is deliberate: out of the box, a double-pass subgraph starts muted until something says otherwise.enabled(BOOLEAN output) - passes the value through, so you can feed it onward into other logic or just watch it on a display node.
The output matters more than it looks like it should, because it means the switch doesn't have to be a dead end - the value that drove the bypass is available for the rest of the graph.
How it works
The backend node itself is embarrassingly thin: it takes the boolean and returns it. All the actual Bypass/Always flipping happens in the frontend, which reads the switch's state and sets the mode of the nodes connected to its inputs. That's why it never shows up in the execution as a data transformation - and why, when you're hunting for "what turned my second KSampler off," the answer is usually this node sitting nearby.
It also plays nice with the rest of the pack. Meta Apply, when it applies inference parameters from an image, syncs the Bypass Switch based on whether that image's metadata contains double-sample fields. Wire the second-pass sampler settings into the same region and you get a workflow that quietly adapts itself per generation.
Installing it
It ships with the pack, so install the whole thing once:
cd ComfyUI/custom_nodes
git clone https://github.com/tsukino4a/ComfyUI-4A-Prompt-Manager.git
cd ComfyUI-4A-Prompt-Manager
python install.py # or: pip install -r requirements.txt
Then restart ComfyUI. Easier route: ComfyUI Manager, search 4A Prompt Manager, install. No model downloads involved - this is a UI/utility pack, not a model pack.
Troubleshooting
- Nothing gets bypassed. Check which nodes are directly connected to the switch's inputs - it only affects nodes with a direct connection, not everything downstream in the general vicinity.
- The state change seems invisible. It's a frontend effect, not a data flow. Look at the mode badge on the connected nodes (Bypass vs. Always), not at wires.
- Only one switch per workflow. If you need two independently switchable regions, you'll be waiting on the author - or faking it with rgthree's group bypasser for the static half and this node for the dynamic half.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| enabled | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| enabled | BOOLEAN | — |