Nodes/ComfyUI-AusBoss/Workflow Switches πŸ†Ž
ComfyUI Node

Workflow Switches πŸ†Ž

One card that turns half your graph off

By ausbossΒ·Created 3 months agoΒ·Updated about 11 hours agoΒ· 107
Workflow Switches πŸ†Ž

      You know the routine: you want to test a workflow without the detail pass, so you ctrl+click-bypass six nodes, run, then un-bypass them all and hope you got the same six. Workflow Switches turns that into a row with an off | on pill. It's the smallest-feeling node in the pack and probably the one you'll leave in every workflow.

      How it works, including the clever part

      There's no schema. No inputs, no outputs, nothing to wire - and the backend registers it purely so that a workflow you download containing it resolves to the right pack when Manager offers to install missing nodes. The frontend marks it virtual, which means it never enters a prompt at all. You cannot break a run with it, and it can't be the reason a graph fails.

      The clever part is where the state lives. The node stores only what you made - which node ids each switch holds, the values it remembers, its settings - in its properties. Whether a row reads on, off or mixed is read from the nodes themselves: their modes and their values. So if you bypass something by hand, undo a move, or reload the workflow, the card is right, because it never had its own opinion to be wrong. A row whose members are only partly on says mixed instead of lying to you.

      The mechanics you'll use:

      • Select the nodes that make up a part of your graph - a sampling chain and its Save Image, say - and press + Switch. They get one pill with a name you choose. Groups you've made on the canvas can each have their own row too, which is the faster path for anything you actually organised.
      • Off bypasses the members, and bypass in ComfyUI means the input passes through to the output, so a step in the middle of a chain can be skipped and the picture still arrives at the steps after it. Where bypass isn't valid for the nodes involved, a setting makes the switch mute them instead. That's the important distinction: bypass keeps the chain intact, mute genuinely removes the nodes from the run.
      • A switch can change settings rather than disable anything. Point it at nodes, save what they should hold for the on state and for the off state, and one click writes the values that differ - Steps to 8 and a LoRA row on, in one press. That's your "fast mode" and "quality mode" without a second graph.
      • A switch can have an off side: members that run only while the row is off. Useful when one click should enable one path and disable its alternative, like an edit that takes its size from the picture it came from.
      • Done folds the editing chrome away and leaves labels and pills - the compact form to ship in a shared workflow.

      This sits in the same family as rgthree's Fast Groups Muter and Fast Groups Bypasser, which are the long-standing answer for "switch a whole labelled region off without deleting it". The case for this one is that the switch is a named, explicit row you place rather than a control that mirrors whatever groups happen to exist - plus the value-setting mode, which the group muters don't do. It's frontend-only, so there is no dependency to satisfy beyond the pack itself.

      Install

      ComfyUI Manager β†’ Custom Nodes Manager β†’ search AusBoss, or:

      cd ComfyUI/custom_nodes
      git clone https://github.com/ausboss/ComfyUI-AusBoss.git
      

      Restart ComfyUI; it lands under πŸ†Ž AusBoss/Utility. No pip packages, no models. The pack as a whole wants ComfyUI 0.27.1 or newer.

      Where people get burned

      After an update, hard-refresh with Ctrl+Shift+R. This node is its frontend. Install a new version and reload a stale tab and you'll get a thin empty card with no rows - the JavaScript is old, not the data. The pack warns about the stale JavaScript for this reason. Same rule for anyone you share a workflow with: they need the pack installed, and Manager will offer it because the node is registered.

      Bypass type mismatches. If a bypassed node's input and output types don't line up, ComfyUI can't pass the value through, and you'll see that as a graph error rather than a switch error. Switch the row's setting to mute, or narrow the switch to nodes that pass the same type.

      Expecting it to control nodes you deleted. A switch holds the ids it was given; remove those nodes and the row has nothing to control. Rebuild it from the new selection - the card follows the graph, so it shows you the truth rather than pretending.

      CategoryπŸ†Ž AusBoss/Utility

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs