Nodes/Comfyui-EzFlex-Presets/EzFlex-NodeSwitchMaster
ComfyUI Node

EzFlex-NodeSwitchMaster

One Dropdown for Every Group Switch You Own

By blackbossokok·Created 20 days ago·Updated about 15 hours ago· 1
EzFlex-NodeSwitchMaster
      config{}

      EzFlex-NodeSwitchGroup solves "turn this region of the graph on and off". EzFlex-NodeSwitchMaster solves the next problem, which only shows up once you have four of them: turning the right combination on and off together.

      Say your canvas has a base branch, a face-detail branch, a hires-fix branch and a video branch, each with its own switch node and its own saved presets. A "photo pass" is some combination of the first three. A "quick draft" is one of them. Without a master, that's four dropdowns you have to remember, and the 4am version of you will get it wrong.

      What it stores

      A master preset is a map from NodeSwitchGroup node id to that node's preset name. Not the switch states - the preset names. That's the key design decision and it's why this node stays small: it never has to know what a switch means, only which named preset each group node should be wearing.

      Applying a master preset is then a two-step cascade: the panel writes the mapped preset name into each target group node's config, then triggers that node's own apply. The group node you understand already does the actual muting; the master just conducts.

      Consequence for building presets: the sub-presets must exist first. If a group node has no preset called "video-off" saved, a master that references it has nothing to point at. Save the layers bottom-up - group presets first, then the master.

      Inputs and outputs

      One input, config (STRING, multiline, default "{}"), documented as "Config JSON produced by the Node Switch Master panel (current master preset name)". No outputs, and the Python body returns an empty tuple. Like the rest of the control family, it's a UI node that reaches into the canvas; it doesn't carry data.

      The rows in the panel - the group nodes it can drive - are discovered by the frontend from the canvas. So the workflow is: drop the master node, it lists the EzFlex-NodeSwitchGroup nodes it can see, you assemble a combination, save it as a named preset. The master presets live server-side in the pack's user_data/EzFlex-NodeSwitchMaster.json, next to the other preset files, which means they survive restarts but travel with the install rather than inside the workflow JSON.

      One structural note that trips people up: this node is not managed by EzFlex-MainControl's group cards - it's in MainControl's card list as a target, but the group nodes themselves are deliberately excluded from it, because routing them through this node is the whole point. Master-of-masters, two levels: MainControl → NodeSwitchMaster → NodeSwitchGroup.

      Install

      cd ComfyUI/custom_nodes
      git clone https://github.com/blackbossokok/Comfyui-EzFlex-Presets
      pip install -r requirements.txt
      

      Or search EzFlex Presets in ComfyUI Manager and restart. mutagen is the pack's only mandatory dependency; nothing here samples anything, so there are no model files and no keys. ComfyUI 0.3.13+ is what the pack declares in its metadata, for the i18n endpoint the panels use.

      Common issues

      The row list is empty. The master finds group nodes by scanning the canvas. If you just added the number, give it a moment, or open another node's panel to force a re-render; if the group nodes are inside a collapsed region, check the pack is on a version that handles subgraph discovery.

      Master switch flips, groups don't follow. Almost always a stale reference - a group node was deleted and re-added, so its id changed and the saved map points at the ghost. Re-record the master.

      Presets shared when you didn't expect it. The README is explicit that EzFlex-NodeSwitchGroup presets are per node instance; the master's own presets are the named ones stored in the pack folder. If two master nodes show the same list, that's the server-side file doing its job rather than a bug.

      A young pack, so keep the changelog handy. Single author, MIT, first published September 2026, v1.2.5 at time of writing. There's no Reddit history to search when it breaks - the README and the source are the documentation, and the source is short.

      CategoryEzFlex

      Inputs (1)

      NameTypeDefaultDescription
      configSTRING{}Config JSON produced by the Node Switch Master panel (current master preset name).

      Outputs (0)

      No outputs