ComfyUI Node

Get Variable

Get Variable

By Mistress-Lukutar·Created 7 days ago·Updated 2 days ago· 1
Get Variable
  • value
  • value
var_name

Get Variable is the receiving half of Lukutar's wireless-variable pair, and it's nearly a no-op node on its own - which is exactly the point. You drop a Set Variable somewhere that publishes a value under a name, then put Get Variable nodes wherever you need that value. No wire across groups, no reroute chains through collapsed subgraphs, no re-rendering a model every time you want its output in a second branch.

The one thing worth internalizing: the Get is connected to its Set by the web extension with an invisible but real link. It serializes into the prompt like any ordinary wire - it just doesn't render on the canvas. That's what makes the pair reliable: ComfyUI handles execution order and output caching itself, and exported API workflows keep working headless with no special handling.

Inputs

  • var_name - the name to read (e.g. img_t2i). It must match a Set Variable in the same workflow. Blank names fail with a clear error.
  • value (optional) - connected automatically by the extension. A manual wire into this input overrides the name, which is a clean escape hatch: want the Get to read something else for one run, or have no web assets loaded? Just wire it by hand. Without the extension, wiring Set output → Get input works fine headless too.

Output

One value output with the variable's original type - IMAGE stays IMAGE, MODEL stays MODEL, whatever you published. There's no type erasure, so the value plugs straight into the same inputs the original would have fed.

Rules that keep you out of trouble

  • Names are global to the workflow. Two simultaneously active Sets sharing a name leave the Get unlinked with a ⚠ and the queue fails with a descriptive error - rename one or mute a branch.
  • Several Sets may share a name when they're on alternative branches (the "generated or loaded" pattern), because muting/bypassing removes nodes from the prompt and only one survives.
  • Variables live within a single queue run; nothing persists between runs.
  • The Get's "no value arrived" error is the pack's best troubleshooting aid - it enumerates exactly what to check (Set exists, branch active, single active Set, value input connected).

Installation

Part of ComfyUI-LukutarNodes (MIT). ComfyUI Manager: Custom Nodes Manager → Install via git URLhttps://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 from the pack's web/ directory automatically, so 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.

When to reach for it

Reach for Set/Get when a value legitimately lives in two or more places - the same model output feeding a sampler and a comparison node, the same conditioning driving two branches, a shared parameter you want to change once. It's not a replacement for wires on a small, tidy graph; it's for the graphs where dragging a wire three screens is the alternative. The design here is sound enough that the pair is worth trying even in a mid-size workflow - and if the invisible link ever confuses you, remember the manual wire always overrides the name, so there's always a fallback that needs zero frontend magic.

CategoryLukutar/Variables

Inputs (2)

NameTypeDefaultDescription
var_nameSTRINGVariable name to read, e.g. img_t2i; a manual wire into value overrides it
valueopt*Connected automatically by the web extension; may be wired manually instead

Outputs (1)

NameTypeDescription
value*