- value
- value
Most wires in a ComfyUI graph exist to move one value from one place to another. SimpleSet is the node that lets you skip the wire: give a value a name, stash it, and any SimpleGet anywhere in the workflow (or any workflow you open this session) can pull it back by name. ComfyUI has no native "name this and reuse it later," which is why these Set/Get variable nodes keep showing up in the ecosystem - people use them to stop dragging the same wire across half the canvas.
It's genuinely handy for the values you reference over and over: a reference image, a seed, a prompt string, a project path, a LoRA you keep swapping between workflows. Drop a SimpleSet next to where the value is produced, and you never hunt for that dangling wire again.
How it works. Behind the scenes there's a single Python dictionary (_variables) in the pack's module, keyed by name. When SimpleSet executes, it runs _variables[name] = value. That's it. The value you set is held in memory for the rest of your ComfyUI session - not saved to disk, not embedded in the workflow. Restart ComfyUI and the store is empty. The pack's small JavaScript frontend also renders a live preview on the node, so after a run you see exactly what's stored: images show up as Tensor [1, 512, 512, 3], strings get quoted, numbers just print. It's a nice touch that turns an invisible store into something you can read at a glance.
The inputs that matter. Just two, and you'll set one of them:
name- the key you'll retrieve with. Exact and case-sensitive:refandRefare different variables.value- whatever you're storing. It's a wildcard type, so images, masks, latents, models, conditioning, strings - anything - fits. Leave it disconnected and you storeNone.
The node passes its input straight through, so value out is value in. You can drop it inline on a wire without breaking the flow, which is the polite way to use it.
Where people get burned:
- Overwriting. Same name, second run, old value silently replaced. If a Get downstream suddenly returns something unexpected, check whether a Set with that name ran later.
- Execution order. Set must execute before the matching Get. Wire SimpleSet's output into SimpleGet's
triggerinput to force the ordering - this is the single most common failure with this pack, and it's covered in the SimpleGet article. - It doesn't survive a restart. In-memory only. Don't build anything that assumes the store persists.
Install. This is one of the easiest packs in the ecosystem - no model downloads, no Python dependencies, pure Python plus a tiny widget file.
cd ComfyUI/custom_nodes
git clone https://github.com/jessesep/SimpleVariables.git
Restart ComfyUI, then look for the nodes by searching "variable". If you have ComfyUI Manager, search "SimpleVariables" there and let it handle the clone. And since custom nodes run arbitrary Python with full access to your machine, it's worth noting this one is tiny - you can read the whole thing in under a minute before trusting it.
Use it for the handful of values you genuinely share. Scatter a dozen of them around and your graph gets harder to debug, because state you can't see hides bugs. For a few names, though, it's the difference between a graph you can read and a tangle.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| name | STRING | var | — |
| valueopt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | * | — |