DDM Set Node
DDM Set Node — stash any value under a name and kill the spaghetti wires
- value
- value
ComfyUI rewards clean graphs, but it punishes you for them: route an image or a latent to two distant places and you're dragging a wire across half the canvas, or wedging reroutes in like furniture. DDM Set Node is the "store" half of a variable trick - you drop a value into it, tag it with a name, and then a DDM Get Node elsewhere on the graph picks it up by that name. No connection line between them, no spaghetti.
It's a routing/quality-of-life node, the same family as rgthree's switch and context packs, except even more stripped-down: it doesn't switch, merge, or compute anything. The one thing it does is write to a dictionary inside the ComfyUI server process.
What you set
Two inputs, and only the second one needs your attention:
value(any type) - the thing to store. Images, latents, models, conditioning, text; whatever you plug in, it stores whole.id(STRING, default"value") - the name you'll use to retrieve it. Case-sensitive, so pick something descriptive like"final_latent"or"lora_model"and use the exact same string on the Get side.
The output is value, which is the same value that went in - a pass-through. That's deliberate: it means the Set node can sit mid-line without breaking the flow, and you can chain Set→Set if you're feeling fancy. It also works as a clean endpoint if you just want to cap off a sub-workflow you might mute later.
The bundled frontend renames the node to DDM Set (your_id) after execution and re-types the output port to match what it saw, so a busy graph stays readable. Minor, but genuinely useful.
How it actually works (and where it bites)
Under the hood it's one line: STORAGE[id] = value, with STORAGE a plain dictionary at module level. That means three real limitations:
- It's memory, not disk. Restart ComfyUI and every stored value is gone. This is a per-session variable, exactly the "variables reset next press" caveat people hit with this class of node. If you need persistence across runs, that's a file-backed cache (WAS Node Suite's Save Cache / Load Cache) - different tool for a different job.
- IDs collide silently. Reuse
"value"(the default) in two Set nodes and the second overwrites the first. You won't get a warning. - If the Set never runs, nothing is stored. Mute it, bypass it, or have it sit behind a group that's switched off, and the Get side returns
Nonewith no error - the whole "get is not accessible if set is disabled" complaint. The two-node pair has no wiring between them, so ComfyUI has no idea the Get depends on this node having executed first; on a brand-new workflow the Get usually runs before the Set has stored anything, so expect aNoneon run one that resolves on run two.
For what it's worth, this is a known friction in the pattern, not a bug in this specific pack - anyone who's used set/get-style nodes in a big workflow has met the first-run None.
Installing it
Trivial, because there's nothing to install beyond the files. No requirements.txt, no model downloads, no heavy dependencies - the entire pack is one Python file plus a small JS frontend.
cd ComfyUI/custom_nodes
git clone https://github.com/Revmagi/DDM_bundle
Then restart ComfyUI. The README says ComfyUI Manager support is "coming soon" and its own clone URL is a placeholder, so don't rely on Manager search - clone the real repo. And the usual custom-node warning applies: this code executes with your user's privileges when ComfyUI loads, so only install it from the actual GitHub repo, not from a workflow someone pasted a link to.
Verdict: a genuinely handy little sink for keeping graphs tidy, provided you treat it as a session-scoped variable and are okay with the first-run None. If you need your stored value to survive a restart, look elsewhere.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| value | * | — | |
| id | STRING | value | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | * | — |