π§Ή Variable Bus (Clear)
The Wireless Bus's Janitor (and Its Light Switch)
- trigger
- done
The Variable Bus family is Orion4D's take on the context-bus idea from the plumbing layer: share data between distant nodes without dragging wires across the whole canvas. π§Ή Variable Bus (Clear) is the odd one out of the trio - it doesn't carry data at all. It's the controller. Think janitor and light switch.
The light switch part. The bus auto-creates invisible sync β dependency links between a Set and a Get that share the same triplet (name + type + execution phase). Those links exist in the graph but are hidden by default. show_bus_links toggles them visible in real time, so when you're debugging a bus workflow you can finally see what's actually connected to what. Without this node in the graph, the links stay hidden - but if you place one, the first Variable Bus (Clear) you add becomes the authority for that visibility toggle.
The janitor part. clear_mode decides what gets wiped:
none- does nothing; the node exists purely as the visual controllerall- empties the entire bus (and releases GPU memory)single- deletes only the variable named invariable_nameall_except- empties everything except the named variable
There's also a "Clear now" button that fires the clear immediately through an HTTP route, without running the workflow - handy when a stale value from a previous run keeps poisoning your outputs. A "Refresh bus links" button forces a full rescan of the auto-connections, which is the fix for a workflow you imported or hand-edited where the Set/Get links didn't rebuild.
Inputs and outputs, honestly. trigger is a wildcard input you can ignore, and done (INT) just reports how many variables were left after the clear - not something you'll wire anywhere useful. The node is marked as an output node, so it runs every time; that's fine, it's cheap.
When you actually need it. You don't. Most workflows want the bus and never want to empty it. You add this node in two situations: you're hunting a stale-variable bug and want to nuke the bus between runs, or you're editing a messy bus graph and want to see (and rebuild) the hidden links. Its "always reruns" design means the clear happens every execution, so leaving one with clear_mode set to all in a workflow will flush the bus on every run - which is sometimes exactly what you want, and sometimes a silent footgun when you forgot it was there.
Install. Same as the whole pack: ComfyUI Manager β search "Orion4D_MetaNode", or clone https://github.com/orion4d/Orion4D_MetaNode into custom_nodes/, restart. Category: Orion4D_MetaNode/Bus. No extra dependencies.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| show_bus_links | BOOLEAN | false | β |
| clear_mode | COMBO | none | 4 options: none, all, single, all_except |
| variable_name | STRING | β | |
| triggeropt | * | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| done | INT | β |