Pyobjects/Dict Merge
Combine two dicts into one, with an in-place option
- dict_a
- dict_b
- DICT
Once you're passing more than one dict around a graph - configuration built up in one branch, metadata assembled in another - you eventually need to combine them. DictMergeNode does that: two dicts in, one merged dict out.
It's part of the Dict* family in ComfyUI-LogicUtils, a data-manipulation pack by GitHub user aria1th - publicly known as AngelBottomless, the trainer behind Illustrious XL, though this data-plumbing side of the pack is separate from that training work. These nodes wrap Python dict operations as ComfyUI graph nodes, for people building programmatic or config-driven workflows rather than a straightforward generation pipeline. Documentation across the pack is thin by the author's own admission - the README says "proper documentation is being prepared, however there are too many nodes" - so the node schema and a bit of hands-on testing are the most reliable guide here.
How it works
You wire in dict_a and dict_b, and the node combines them into one DICT. The optional in_place boolean (default false) is the one setting worth understanding before you use this node seriously: with standard Python dict-merge semantics, when both dicts share a key, one side's value wins - and in_place controls whether the merge mutates dict_a directly (writing dict_b's values into it) versus building a new combined dict and leaving both originals untouched. If you're reusing dict_a elsewhere in your graph after this merge, that distinction matters: an in-place merge means anything else still holding a reference to that same dict object will see the merged result too, not the original.
The inputs and outputs that matter
dict_aanddict_b(DICT, both required) - the two dicts to combine.in_place(BOOLEAN, optional, defaultfalse) - whether the merge mutatesdict_adirectly rather than producing a fresh combined dict.- Output: a single
DICT- the merged result.
How to install it
Via ComfyUI Manager: search ComfyUI-LogicUtils, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/aria1th/ComfyUI-LogicUtils
Restart ComfyUI. No model downloads needed - pure Python data handling, nothing GPU-related. The README's opt-in auto-install hook (COMFYUI_LOGICUTILS_AUTO_INSTALL=1, disable with COMFYUI_LOGICUTILS_SKIP_INSTALL=1) is for heavier parts of the pack elsewhere; this node doesn't touch it.
Common issues & troubleshooting
A value you expected from dict_a got overwritten. When both dicts share a key, standard dict-merge behavior has the second dict's value take precedence - so a shared key in dict_b will overwrite the corresponding value from dict_a. If that's not what you want, check which dict you're feeding into which input, or set up your keys so they don't collide in the first place.
Something else in your graph is unexpectedly seeing the merged data. That's the in_place: true behavior - it mutates dict_a directly rather than returning an independent copy. If you need the original dict_a to stay untouched elsewhere in the graph, leave in_place at its default false.
Merge doesn't run when you expect it to. Like the rest of the Dict* family, this node is flagged as an output node in ComfyUI's execution model, so it should still execute even without a downstream connection - if it genuinely isn't running, check that both dict_a and dict_b are actually wired in, since a missing required input will block execution regardless of the output-node flag.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| dict_a | DICT | — | |
| dict_b | DICT | — | |
| in_placeopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DICT | DICT | — |