- value
- value
People have been asking ComfyUI for "wireless nodes" - publish a value once, read it anywhere, no wire stretching across groups and collapsed subgraphs - since at least 2023. Set Variable is that idea, done properly: it publishes any value under a name, and a matching Get Variable anywhere in the graph reads it. No wire across the canvas, no reroute spaghetti, no hunting for the one connection that's now three screens away.
The type is arbitrary. IMAGE, MODEL, CONDITIONING, SEGS, a string, a latents batch - the value passes through untouched, so it keeps its exact type end to end. The node titles even show the detected type (Set · img_t2i [IMAGE]), which is a small nicety that saves you from guessing what's flowing where.
The trick that makes it actually work
This is the part that separates it from a toy. Most "variable" approaches rewrite the serialized prompt at queue time, which is fragile and breaks headless/API runs. Lukutar's Set/Get instead uses a real canvas link that's invisible: the web extension connects each Set's value output to every matching Get's value input - a genuine wire that serializes into the prompt like any other, it just never renders on the canvas.
Because the connection is real, ComfyUI itself owns execution ordering and output caching, and exported API workflows run headless without extra machinery. That's a quietly excellent design call. Without the web assets, you can wire the Get's value input by hand and it works the same way - which is also your escape hatch if you ever want to override the name.
Inputs and rules that matter
var_name- the variable's name (e.g.img_t2i). Get Variable nodes with the same name receive the value. Blank names fail with a clear error.value- the value to publish, any type. The outputvalueis a pure pass-through, so the Set node can sit inline in a normal wire chain too.
The rules are where you can get burned, so read them once:
- Several Sets may share a name on alternative branches - the "generated or loaded" pattern - as long as only one branch is active. Muting/bypassing a branch removes its nodes from the prompt, so exactly one Set survives. This is the author's explicitly-claimed difference from KJNodes' Set/Get, which rejects duplicate names outright.
- Two simultaneously active Sets with one name are ambiguous: the Get stays unlinked, both nodes get a ⚠, and the queue fails with a descriptive error. Rename one or mute a branch. Branches merged by a switch should use a single Set after the switch instead.
- Variables live within one queue run - not persisted between runs, and you can't "reassign" sequentially (set → set → get reads the last), because that's a duplicate-name conflict.
Installation
Part of ComfyUI-LukutarNodes (MIT). ComfyUI Manager: Custom Nodes Manager → Install via git URL → https://github.com/Mistress-Lukutar/ComfyUI-LukutarNodes, or:
cd <ComfyUI>/custom_nodes
git clone https://github.com/Mistress-Lukutar/ComfyUI-LukutarNodes
Restart ComfyUI. The frontend extension loads automatically (it's served from the pack's web/ directory), so the invisible links work out of the box. Only extra runtime dependency is opencv-python (>= 4.8); Manager installs requirements.txt, manual installs may need pip install opencv-python. No models, no keys. Category Lukutar/Variables.
Common issues
- "No value arrived" on the Get - the backend's error message is unusually good and tells you exactly what to check: a Set with that name exists, its branch is active (not muted/bypassed), it's the only active Set with the name, and its value input is connected - or wire the Get's value manually.
- The invisible link doesn't appear after a mute/bypass toggle - the extension syncs on node create/configure/remove and connection changes, but litegraph fires no callback on mode changes, so it uses a cheap 1-second poll to keep links correct. Give it a moment.
- It's a young pack (v0.10.x, 2026) with minimal community footprint - the README's Set/Get section is thorough and worth reading before you hit the queue button.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| var_name | STRING | Variable name, e.g. img_t2i; Get Variable nodes with this name receive the value | |
| value | * | Value to publish; any type, passed through unchanged |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | * | — |