mape Variable
The wireless node that tames graph spaghetti
- *
- *
mape Variable is a "wireless" node: you plug a value into one copy of it and pull the same value out of another copy somewhere else, with no wire running between them. It's the fix for the moment your workflow stops looking like a pipeline and starts looking like a bowl of spaghetti - the MODEL output of a LoraLoader feeding three different nodes, a CONDITIONING that has to cross half the canvas. Instead of dragging a cable across everything, you drop a SET node on the source, a GET node next to each consumer, give them the same name, and the wire effectively disappears.
The name is a bit of a lie, by the way - nothing is sent anywhere. There's no global variable store and no hidden channel. It's pure graph surgery, done in your browser.
How it works
The trick: mape Variable never actually reaches the sampler. The Python class in the pack is just a stub (OUTPUT_NODE = True, wildcard * in and out, a name string) so the node can register in ComfyUI's node list. The real work happens in js/tweak/mape-helpers.js when you hit Queue. The frontend intercepts graphToPrompt, finds every GET node, matches it to the SET node carrying the same variable name, rewrites the prompt so the server sees the connection coming straight from the original source node - then strips every mape Variable node out of the payload before it's sent.
Because it's resolved at queue time, it works with literally any type. MODEL, CLIP, IMAGE, an int, whatever - the wildcard input and output mean no type checking happens, which is both the power and the trap (more below).
Making a SET/GET pair
You almost never add this node from the search menu. You create pairs from existing wires:
- Shift + click on a link to split it into a 💾 SET node and a GET node
- Shift + drag from an output socket
- select nodes and hit Shift + S to convert their links
- or use the "Convert links to set/get" button in the pack's menu
The pack names the variable after the target input (e.g. positive), and if two pairs would end up with the same name from different sources, it auto-suffixes - positive_from_12_to_37. If you see that in a title, that's why.
The inputs that matter: a name string (the variable name - also the thing you double-click the title to change), one wildcard * input (the value slot on a SET), and a * output (emitted by a GET). The title shows the variable name, so the node reads like 💾 positive. Select any SET or GET and hit W to rename every instance at once.
Installing it
ComfyUI Manager → search "mape's helpers" and install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/mape/ComfyUI-mape-Helpers
then restart ComfyUI. No Python dependencies, no model downloads - it's a JS extension plus a tiny stub. Note you're getting the whole pack (multi-monitor preview, prompt tweaking, command palette, fuzzy search, node time tracking, organizing) whether you wanted it or not; the variable node is one feature in a fairly opinionated QoL bundle.
Where people get burned
- It only works from the web UI. The rewrite is client-side. Load the workflow in a non-web frontend, or POST the JSON straight to the
/promptAPI withmape Variablenodes still inside, and execution fails - the server-side class has no real function to run. Always queue from the ComfyUI browser. - No type checking. Feed a string into a SET whose GET is plugged into a LoadImage input and the error surfaces three nodes downstream, far from the cause. Names are the contract; keep them tidy.
- If you add the node manually, the
namewidget is the variable identifier, but it's easy to confuse with the title. Rename via the title, not the widget, if you're reusing pairs.
For giant multi-model or batch workflows it's genuinely the node you'll reach for - but it's a UI convenience, not a data-flow feature, and treating it like one is where it bites.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| name | STRING | — | |
| *opt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |