多框忽略并切换
Flip between two workflow groups like an A/B test
- input1
- input2
- output
A single switch node handles two wires, but a lot of real decisions are between two halves of a workflow: two different upscaler chains, two sampler stacks, two model loaders with all their conditioning. FastGroupsBypassSwitch ("多框忽略并切换" in Chinese) is the group-level version of that idea. You bind it to two ComfyUI groups, pick which one is active, and it bypasses the other group's nodes for you and routes the active group's output through. No hunting through a giant graph muting a dozen nodes by hand.
It's from the ComfyUI-FeiHou-Toolbox pack, and it's styled after rgthree's Fast Groups Bypasser - the KB's rgthree panel describes that family as the quality-of-life layer that keeps large workflows workable. Same job here, but as a two-group A/B switch rather than a dashboard.
How it works
The node's frontend reads and writes three properties stored on the node itself: which group is selected, and the names of group 1 and group 2. When you toggle the selection, the JS walks the two groups and flips the inactive group's nodes into bypass mode (LiteGraph's MODE_BYPASS), while the backend lazily executes only the active branch - the same lazy-input trick as the pack's Switch V2, but the "which side" decision comes from the UI state stored in the workflow rather than a boolean wire.
The node exposes two any-type inputs, input1 and input2, and one output. The convention: input1 is the tail of group 1, input2 is the tail of group 2, and whichever group is active has its input passed through to output. Because the selected branch is read from the saved workflow state, this works when you queue from the ComfyUI UI - the frontend writes the selection before the graph runs.
Worth noting it's marked experimental in the source. It works, but it's the kind of node whose behavior depends on how carefully you named and bound your groups.
Setting it up
- Group the two halves of your workflow (select nodes, Ctrl+G, name them in the group title).
- Add the node and set group 1 / group 2 names in its UI so it knows which group is which.
- Wire the last output of each group into
input1/input2, and takeoutputinto whatever both groups were feeding. - Toggle the active group. The inactive half bypasses; the active half runs and passes through.
Install
ComfyUI Manager (search ComfyUI-FeiHou-Toolbox), or:
cd ComfyUI/custom_nodes
git clone https://github.com/FX-FeiHou/ComfyUI-FeiHou-Toolbox
Restart ComfyUI and hard-refresh the browser - the group toggling lives in the pack's JS, so a stale page means no switch UI. No extra Python dependencies, but the pack needs a current ComfyUI (it's written against the newer comfy_api.latest node API).
Gotchas
- Error on run, selected branch empty - you toggled to a group whose input isn't connected. The error message comes out in Chinese; the fix is connecting the active branch or switching back.
- Selection not sticking / no toggle UI - the frontend didn't load. Hard-refresh the browser; this node depends on its JS and on the workflow's saved node properties.
- Groups named wrong - the node bypasses whatever group you told it is group 1/2, not what you meant. Name the groups before you flip anything, or you'll bypass the wrong half and scratch your head at the output.
- API-only queueing - because the selection lives in frontend workflow state, driving this purely through the API without the UI state can misroute. Keep it UI-driven.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| input1opt | COMFY_MATCHTYPE_V3 | — | |
| input2opt | COMFY_MATCHTYPE_V3 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | COMFY_MATCHTYPE_V3 | — |