ComfyUI Node

Set Dict

Bundle any value onto a single wire in ComfyUI

By antrobot1234·Created 3 years ago·Updated about a year ago· 28
Set Dict
  • any
  • DICT
  • DICT
key

If your workflow has turned into a plate of spaghetti and you're tired of dragging one wire across six screens, this is the node that fixes it. Set Dict takes any value you hand it, stuffs it into a little labeled container, and sends that container down a single wire. Later, somewhere across the graph, a matching Get Dict node reaches into the container and pulls the value back out by name. One wire instead of ten.

It's the same idea as rgthree's Context nodes or the "Set/Get" nodes half the ecosystem uses: bundle a bunch of connections so a large workflow stays readable. The difference is that Context nodes give you a fixed set of typed slots (model, clip, vae, positive, and so on), while Set Dict is a plain keyed grab-bag. You pick the names, you decide what goes in, and it'll take literally any type. That flexibility is the whole pitch, and it's also the thing you can shoot yourself in the foot with, but more on that below.

How it works

Under the hood a "dict" here is just a Python dictionary riding on a custom DICT wire. Set Dict does one of two things. Hand it a key and a value and nothing else, and it creates a fresh dict, {key: value}, and outputs it. Hand it a key, a value, and an existing DICT, and it appends the new pair to that dict instead and passes the whole thing along.

That second behavior is the point. You chain them. Set Dict number one creates the bundle, its DICT output feeds the DICT input of Set Dict number two, which adds its own key, and so on down the line. By the end you've got one wire carrying a dozen values, and you route that single wire to wherever you need them.

The inputs and outputs that matter

There are really only three things on this node:

  • key (string) - the name you'll use to fetch the value later. This is the important one. Get Dict looks it up by exact string match, so seed and Seed are two different keys.
  • any (*) - the value itself. The type is a wildcard, so you can wire in a model, a latent, a string, an int, whatever. There's no widget on it; you connect something.
  • DICT (optional) - an existing bundle to append to. Leave it empty to start a new one; wire in the previous node's output to keep building.

The single output is DICT, which goes either into the next Set Dict in the chain or off to a Get Dict node when you're ready to unpack.

Installing it

Two ways, same as any custom pack. Through ComfyUI Manager, open Install Custom Nodes, search for antrobots ComfyUI Nodepack, install, and restart. Or do it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/antrobot1234/antrobots-comfyUI-nodepack

then restart ComfyUI. The nice part: this pack is pure Python dict-shuffling with no model files to download and no heavy dependencies, so you skip the requirements-conflict headache that most packs drag in with them.

Common issues

The failure mode you'll actually hit is the silent one. Because Get Dict matches keys as exact strings, a typo or a stray capital letter means the lookup quietly falls back to the default instead of throwing an error. Nothing turns red; you just get the wrong value and wonder why. When a bundled value "isn't coming through," check the spelling on both ends first.

Second, DICT is a private type this pack invented. Only the antrobots Get Dict family knows how to read it, so don't try to feed the output straight into a stock ComfyUI node expecting it to understand. Set on one end, Get on the other, always.

Third, if you meant to build one bundle but forgot to chain the DICT input through each node, you'll end up with several separate one-key dicts instead. Each Set Dict with an empty DICT input starts fresh, so thread the output of one into the input of the next.

And a fair word on the pack itself: it's a one-person project with almost no community footprint, so you won't find a Reddit thread when something breaks. The README straight-up asks you to file a GitHub issue, which is the right move here since you're one of few people running it.

Categoryantrobots-ComfyUI-nodepack/dicts/set

Inputs (3)

NameTypeDefaultDescription
keySTRING
any*
DICToptDICT

Outputs (1)

NameTypeDescription
DICTDICT