Merge Dicts
Combine two dict bags into one
- DICT1
- DICT2
- DICT
Merge Dicts takes two DICT bags and combines them into one. That's the whole job, and in antrobot's dict system it's the node that lets you assemble bags from separate branches. You build up one dict in the left half of your workflow, another in the right, and Merge Dicts joins them so a single downstream node can getDict values that originated in completely different places.
If you've been using the Set Dict nodes, you already know a dict is an open bag of named values - you stash things under keys, carry the bag on one wire, and pull them out by name later. Set Dict builds a bag one entry at a time by chaining. Merge Dicts is the other move: take two fully-built bags and fuse them. Useful when two sub-graphs each produce their own dict and you don't want to re-thread everything through a single chain.
How it works
It's a straightforward combine: the key/value pairs from both input dicts end up in one output dict. Everything that was in DICT1 and everything that was in DICT2 comes out the other side together, retrievable by the same keys you originally used.
The inputs and outputs that matter
- DICT1 (required) - the first bag.
- DICT2 (required) - the second bag.
Both are required - this node needs two real dicts to merge, it's not a passthrough for one. One output: DICT, the combined bag. Wire it into your Get Dict nodes or another Merge Dicts if you're stitching more than two.
Installing it
Pure Python, no model downloads, no heavy deps - installs in seconds. 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. Note it's filed under the generic sd category rather than with the other dict nodes, so if you're hunting for it in the node menu, that's where it hides.
Common issues
The thing to be careful about is key collisions. If both dicts contain the same key - say both have an "image" entry - only one value can survive the merge, and you shouldn't assume which. The safe habit is to keep keys unique across the two bags you're combining; if you genuinely need the same-named value from a specific source, keep that dict separate and getDict from it directly instead of merging.
Both inputs are required, so if either dict wire is empty the node has nothing to do and will error - make sure both branches actually produced a dict before they reach here. And as always, DICT is a custom type that only speaks to this pack's dict nodes. It's a small one-person pack, so a real bug is a GitHub issue; the author invites them directly.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| DICT1 | DICT | — | |
| DICT2 | DICT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DICT | DICT | — |