π Variable Bus (Set)
Stash a Model, an Image, or a Prompt β No Cables Required
- input
- passthrough
- sync
Every ComfyUI workflow eventually hits the same wall: you've got a value - a model, a latent, a prompt - that needs to reach a node on the other side of the graph, and the wire would cross half your canvas. π Variable Bus (Set) is the write side of this pack's wireless answer: it stores any value in a shared in-memory bus under a name, and the matching Get pulls it out elsewhere with no visible cable.
How it works. You connect anything to input (typed *, so it accepts images, latents, strings, models, conditioning - all of it), then declare the triplet that identifies it: variable_name, data_type (from *, IMAGE, LATENT, MASK, STRING, INT, FLOAT, MODEL, CONDITIONING, CLIP, VAE, LIST), and execution_phase (1β8, for ordering multiple writes to the same name). JavaScript then finds the Get sharing that triplet and silently creates a real dependency link - Set's sync output wired to the Get's dependency input - so ComfyUI's execution engine knows the Set must run first. The link is invisible by default, but it's genuinely in the graph.
Under the hood the value goes into a Python OrderedDict - a FIFO capped at 64 variables, evicting the oldest and calling torch.cuda.empty_cache() when something drops, so a model you bused around doesn't pin VRAM forever.
Why it always runs. The node is declared OUTPUT_NODE and its IS_CHANGED returns NaN - the always-rerun trick from the plumbing layer, deliberately, so the bus always holds this run's fresh value rather than whatever the cache decided to keep. The cost of that idiom is real: any node behind a Set loses caching. Don't string twenty of them in one graph and wonder why it's slow.
Outputs. passthrough returns the original data unchanged, re-typed to match your data_type (you'll see the socket change color), and sync is the INT write-tick that the Get's dependency input consumes. Practical pattern: chain the Set inline with passthrough continuing the branch, and it doubles as a "tap" that both stores and forwards.
Where people get burned: triplet typos (name and phase must match the Get exactly), and reading a value before any Set ran - the Get will block cleanly rather than crash, but it's still a silent stop. Also remember the 64-entry FIFO: long-running workflows that bus big latents around will evict old entries, and eviction is silent.
Install. ComfyUI Manager β search "Orion4D_MetaNode", or clone https://github.com/orion4d/Orion4D_MetaNode into custom_nodes/ and restart. Category: Orion4D_MetaNode/Bus. No extra dependencies.
If you've ever rebuilt a huge workflow just to move one wire, Set is the node that makes you stop doing that.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| input | * | β | |
| variable_name | STRING | my_var | β |
| data_type | COMBO | * | 12 options: *, IMAGE, LATENT, MASK, STRING, INT, +6 |
| execution_phase | COMBO | 1 | 8 options: 1, 2, 3, 4, 5, 6, +2 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| passthrough | * | β |
| sync | INT | β |