Nodes/AUN ComfyUI Nodes/Node Collapser & Bypasser Advanced
ComfyUI Node

Node Collapser & Bypasser Advanced

One switch, many nodes, both jobs

By loz2754·Created 8 months ago·Updated about 24 hours ago· 5
Node Collapser & Bypasser Advanced
      node_ids
      combinedfalse
      use_mutefalse
      collapsefalse
      activetrue

      Most node controllers do one job: bypass, or mute, or collapse. The "Advanced" here means this one does all three at once, and it's the most honest use of the word in the pack. You give it a list of node IDs, and it can collapse them, bypass or mute them, or do both in one shot - which turns out to be exactly what you want when you're decluttering a workflow and disabling a branch at the same time.

      What it does

      You feed it comma-separated node IDs (5,12,23), and it controls two independent things about those nodes: their collapse state (collapsed hides the node body, expanded shows it) and their active state (bypass or mute). The combined toggle is the interesting bit: flip it on, and one action collapses and disables the target nodes together - the "tuck this section away" button. Flip it off, and you get separate toggles for collapse vs active, so you can fold a node away while leaving it functional.

      Inputs

      • node_ids - comma-separated numeric IDs, the one thing you must get right. The tooltip example is '5,12,23'. Invalid entries are skipped with a warning, so a typo doesn't kill the whole call.
      • combined - when ON, sets collapse and bypass/mute together based on use_mute. When OFF, uses the individual toggles below.
      • use_mute - ON means control mute instead of bypass for the targeted nodes.
      • collapse - Collapsed ▶ / Expanded ▼; only honored when combined is off.
      • active - ON means nodes are active, OFF disables them (bypassed or muted per use_mute). Also only directly honored in non-combined mode.

      No outputs. Pure controller.

      How it works

      This one works by node ID, and it's a good example of why IDs beat titles in some situations. It parses the ID list, then fires WebSocket events for each node: AUN_set_collapse_state for collapse, plus AUN_node_bypass_state or AUN-node-mute-state for the disable half. There's a nice touch in the non-combined path - when you use mute, it also clears any leftover bypass state, and vice versa, so a node can't silently stay in a stale state you forgot about. That kind of bookkeeping is why you use a controller instead of clicking around.

      The tradeoff: you need the node IDs, which aren't the friendliest thing to discover. Hover the node, check the workflow JSON, or use one of AUN's graph-scraping utilities to find them. For a workflow you've built yourself and saved, though, the IDs are stable - which is exactly what you want in a workflow you're going to reuse.

      When to reach for it

      Where this shines: batch cleanup. You've got ten nodes scattered across the canvas that are all part of a disabled path. With the title/group controllers you'd need consistent naming or drawn groups; here you just list their IDs once and you're done. The combined mode is the standout - one boolean, and a whole experiment section collapses itself out of the way and stops running. If you share workflows, this also makes them dramatically tidier for the person who loads them, because the collapsed state saves with the graph.

      Installing

      Part of the AUN ComfyUI Nodes pack:

      cd ComfyUI/custom_nodes
      git clone https://github.com/loz2754/AUN-ComfyUI-Nodes
      

      Restart ComfyUI, or use ComfyUI Manager (search "AUN"). No model downloads. Standard pack requirements (piexif, opencv-python-headless, requests) are auto-installed by Manager; manual clones may need pip install -r custom_nodes/AUN-ComfyUI-Nodes/requirements.txt.

      One warning to end on: node IDs shift if you copy-paste sections or rebuild a graph, so workflows using this node are sensitive to heavy editing. For a stable, saved workflow it's great - for a work-in-progress you're constantly re-arranging, the title or group controllers are less likely to need re-wiring.

      CategoryAUN Nodes/Node Control

      Inputs (5)

      NameTypeDefaultDescription
      node_idsSTRINGComma-separated node IDs to control (e.g., '5,12,23').
      combinedBOOLEANfalseWhen ON, set Collapse and Bypass/Mute together (based on 'Use Mute'). When OFF, use the individual toggles below.
      use_muteBOOLEANfalseIf ON, control Mute instead of Bypass for the targeted nodes.
      collapseBOOLEANfalseCollapsed (▶) hides node body; Expanded (▼) shows it when Combined Off.
      activeBOOLEANtrueWhen OFF, the nodes are disabled (Bypassed or Muted depending on 'Use Mute'). When ON, nodes are active.

      Outputs (0)

      No outputs