Nodes/ComfyUI-QG-tools/Workflow Switches
ComfyUI Node

Workflow Switches

QG Workflow Switches

By live1617·Created 23 days ago·Updated 2 days ago· 4
Workflow Switches

      The thing it fixes

      You have a two-pass upscale block you don't always want. So you select it, Ctrl+B, look at the result, Ctrl+B again. Or you have a "quick preview" mode where you want Steps 8 and one LoRA off, and you spend the whole evening retyping numbers to compare.

      QG Workflow Switches is a card that turns that into a named toggle. Select the block - say the upscale node plus its Save - hit + Switch on the card, name it, and you get an off | on pill that bypasses or restores the whole set. Press Done and the card shrinks to just the labels and their switches, so it stays out of the way.

      Group-muting isn't new; ComfyUI's own front end can bypass group nodes, and rgthree's Fast Groups Bypasser is the established version of this idea in a pack everyone already runs. The difference here is that a switch can hold any set of nodes you pick, not just a real group, and that a switch can change settings instead of switching anything off.

      How it works

      The card is inert. It has no inputs, no outputs, never runs, and the front end keeps it out of the prompt entirely. It's registered as a real node class anyway, which is a nice touch - registry scanners and "install missing custom nodes" can find the pack from a workflow that uses it.

      The state doesn't live in the card either. The truth is each target node's own mode, in the graph engine. Flicking a switch to off sets those nodes to bypass (LiteGraph mode 4) - literally the same thing the front end's own "Bypass Group Nodes" does - so the picture keeps passing through to whatever comes next and the workflow doesn't break. Flip a setting and off means mute instead, which is "never": the node doesn't run and anything downstream that needed its output just stops. Bypass when you want to skip a step; mute when you want to be told that skipping it breaks the chain.

      What the card does store, in the node's own properties, is which node IDs belong to each switch, the values it remembers, and its settings. That's why switch states save with the workflow.

      Three granularities: a switch over arbitrary selected nodes, a switch over a named group, and the global policy in settings, which generates switches in bulk - none, one per group, or grouped by number.

      Turn on one at a time and opening a row closes the others, first switching every other row off. That's the feature for "two upscalers, pick one."

      Using a switch as a preset

      This is the part people miss, because the node is called Switches. A switch can hold values as well as modes. Select your nodes, adjust them to how they should look when the switch is on, save that as the "on" set; adjust to the other configuration and save it as "off". After that, one click sets Steps to 8 and turns a LoRA row on - no bypassing anywhere, no deletion, nothing to undo.

      This helps for fast/full modes, different sampler settings per checkpoint, a LoRA row you toggle in and out of a character stack. It can't help with anything outside the switch's node set, since a preset only remembers nodes that were selected when you built it.

      Installing it

      cd /path/to/ComfyUI/custom_nodes
      git clone https://github.com/live1617/ComfyUI-QG-tools
      

      Manager has it as ComfyUI-QG-Tools once the registry listing is live - if the search comes up empty, the clone above is the way. Full restart of ComfyUI afterwards, then look for [QG-tools] v0.5.0 加载完成 in the console. No pip installs; the pack has zero third-party dependencies.

      The README's version line is stale - it says v0.4.0 and three nodes while the repo now ships four. Don't panic when the counts disagree.

      Where it goes wrong

      Bypassing the wrong thing. Bypass is the default for "off" because it usually keeps the graph valid. But it can hide mistakes: bypass the Save node and the run finishes with nothing on disk and no error, because nothing downstream complained. Mute it instead if you want feedback.

      Stale entries. A switch remembers nodes by ID, so deleting a node inside a switch leaves a dead row behind, and copying nodes into another workflow won't carry them into an existing switch. Rebuild or re-add - it takes seconds.

      Expecting it to run. It has no outputs, so it can't be why a graph fails to execute, and it can't route data. If what you actually need is to pass either image A or image B downstream, that's a logic switch, not this.

      Front-end drift. The card is a custom-drawn canvas panel, and that's precisely the category of node that ComfyUI's Nodes 2.0 frontend rewrite broke for other packs - with rgthree, LoRA toggles stopped redrawing until the node was resized and stayed that way for months. After installing or updating, hard-refresh the browser (Ctrl+Shift+R); ComfyUI only reads its extension list at page load. If panels start acting up, try Nodes 2.0 off before filing anything.

      CategoryQG-tools/Workflow

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs