Get Dict Int
Pull a whole number out of a dict
- DICT
- INT
Get Dict Int pulls an integer - a whole number - out of a DICT by name. The integers you'd want to carry through a dict are the structural ones: seed, step count, width, height, a batch size, a frame index. Stash one under a key early and this node hands it back wherever a downstream node needs that exact value, so a single number stays consistent across every stage that reads it.
Seed is the standout use. Keep the seed in the shared dict bag and every sampler, every pass, every naming node reads the same value - which is exactly what you want when you're trying to reproduce or vary a generation deliberately rather than fighting three independent seed widgets that have drifted apart. The dict turns loose numbers into a single source of truth for the graph.
How it works
It's a typed Get Dict. Per the README, that means it behaves like the plain Get Dict but with an optional default and type validation. Request a key; if it holds a real integer, you get it. If the key's missing or the stored value isn't an int, the node returns the default. Omit the default and the automatic fallback for this type is 0.
The inputs and outputs that matter
- key (required, text) - the name the integer was stored under. Match the Set Dict key exactly.
- DICT (required) - the bag to read from.
- default (optional, default 0) - the fallback if the key is missing or the wrong type.
One output: INT. Wire it into any integer input - seed, steps, width, height.
Installing it
Pure Python, no weights, nothing heavy - installs fast. ComfyUI Manager → Install Custom Nodes → search "antrobots ComfyUI Nodepack" → Install → restart, or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/antrobot1234/antrobots-comfyUI-nodepack
then restart. It's under antrobots-ComfyUI-nodepack/dicts/get.
Common issues
The automatic 0 default is the thing to watch. A mistyped key silently returns 0, and for some integer inputs that's a nasty value - 0 steps won't sample, a 0 seed is valid but probably not the one you meant. Set an explicit default rather than relying on the zero, so a lookup miss fails toward something sane.
Note also that a float stored under the key won't satisfy the int type check - you'll get the default, not a rounded number - so keep the stored type honest at the Set end. The standard dict caveats round it out: DICT is required, keys are case-sensitive strings, and typos fail quietly rather than loudly. Check spelling on both ends first when a number looks off. Solo pack; genuine bugs go to the GitHub issue tracker the author points to.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| key | STRING | — | |
| DICT | DICT | — | |
| defaultopt | INT | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |