Nodes/was-node-suite-comfyui/Text Dictionary Update
ComfyUI Node Runs on cloud

Text Dictionary Update

Merge two WAS dictionaries into one

By WASasquatch·Created 3 years ago·Updated about 16 hours ago· 1,840
Text Dictionary Update
  • dictionary_a
  • dictionary_b
  • dictionary_c
  • dictionary_d
  • dictionary_e
  • dictionary_f
  • dictionary_g
  • dictionary_h
  • dictionary_i
  • dictionary_j
  • dictionary_k
  • dictionary_l
  • dictionary_m
  • dictionary_n
  • dictionary_o
  • dictionary_p
  • dictionary_q
  • dictionary_r
  • dictionary_s
  • dictionary_t
  • dictionary_u
  • dictionary_v
  • dictionary_w
  • dictionary_x
  • DICT

Two dictionaries in, one dictionary out - the README puts it plainly: "merge two dictionaries." That's Text Dictionary Update's entire job, and it's the node that makes WAS's dictionary family actually composable instead of a pile of one-off boxes.

Where this fits

The pattern it enables is base-plus-overrides. Build a dictionary of defaults with Text Dictionary New - your standard style, your usual negative terms, whatever settings repeat across most of your runs - then build a second, smaller dictionary of just the things that change this run, and merge them here. You keep one stable base instead of retyping the whole thing every time you want to vary one field.

It's also how you assemble a dictionary from more than one source. Text Dictionary Convert can parse a dictionary out of loaded text; if you need to combine that with values you built directly in the graph, this is the node that stitches the two together into something Text Dictionary Get or Text Dictionary Keys can read as one object.

How it works

Standard dictionary merge semantics: the two DICT objects you feed in are combined into a single dictionary. Where WAS's underlying Python dict-merge behavior applies, a key present in both inputs typically resolves to whichever one is treated as the "update" side, mirroring how Python's own dict.update() works - so if you're relying on a specific key winning a collision, it's worth confirming with Text Dictionary Keys (or Get) on the merged result rather than assuming, since I don't have a formal schema confirming which input takes priority.

The inputs and outputs that matter

Two dictionary inputs - both DICT-type objects sourced from any of WAS's other dictionary nodes - and one merged DICT output. That output wires straight into anything else in the family: Get to read a value back out, Keys to confirm what actually survived the merge, or another Update if you're layering in a third source.

How to install it

Bundled with WAS Node Suite, no separate download.

ComfyUI Manager: search "WAS Node Suite," install, restart.

Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui

then install requirements.txt against your ComfyUI Python and restart. Pure data handling - no model, no GPU.

Common issues & troubleshooting

A value you expected got overwritten. This is the classic merge-order trap with any dict update: if the same key exists in both inputs, one of them wins, and it's not always obvious which from the graph alone. Run the result through Text Dictionary Keys and Get to check what actually landed before assuming the node dropped or ignored a value.

Merged dictionary looks empty or wrong. Confirm both inputs are genuinely DICT objects and not plain text - a text string that merely looks like a dictionary won't merge; it needs to come from Text Dictionary New or Text Dictionary Convert first.

Every WAS node throws "Import Failed." Not this node specifically - the whole pack has been unmaintained since December 2023, and a ComfyUI core update can knock its pinned dependencies out of sync, taking every WAS node offline at once. Reinstall requirements.txt against the correct, activated Python environment (or run install.bat) and restart to bring them back.

CategoryWAS Suite/Text/Dictionary

Inputs (24)

NameTypeDefaultDescription
dictionary_aDICTThe base dictionary. Its entries are the ones overwritten when a later input carries the same key.
dictionary_bDICTMerged over dictionary_a, so a key in both takes this one's value.
dictionary_coptDICTMerged over the first two. Unconnected, it contributes nothing.
dictionary_doptDICTMerged last, so it wins every clash. Unconnected, it contributes nothing.
dictionary_eoptDICTDictionary 5. Its keys win over every input before it and lose to every one after.
dictionary_foptDICTDictionary 6. Its keys win over every input before it and lose to every one after.
dictionary_goptDICTDictionary 7. Its keys win over every input before it and lose to every one after.
dictionary_hoptDICTDictionary 8. Its keys win over every input before it and lose to every one after.
dictionary_ioptDICTDictionary 9. Its keys win over every input before it and lose to every one after.
dictionary_joptDICTDictionary 10. Its keys win over every input before it and lose to every one after.
dictionary_koptDICTDictionary 11. Its keys win over every input before it and lose to every one after.
dictionary_loptDICTDictionary 12. Its keys win over every input before it and lose to every one after.
dictionary_moptDICTDictionary 13. Its keys win over every input before it and lose to every one after.
dictionary_noptDICTDictionary 14. Its keys win over every input before it and lose to every one after.
dictionary_ooptDICTDictionary 15. Its keys win over every input before it and lose to every one after.
dictionary_poptDICTDictionary 16. Its keys win over every input before it and lose to every one after.
dictionary_qoptDICTDictionary 17. Its keys win over every input before it and lose to every one after.
dictionary_roptDICTDictionary 18. Its keys win over every input before it and lose to every one after.
dictionary_soptDICTDictionary 19. Its keys win over every input before it and lose to every one after.
dictionary_toptDICTDictionary 20. Its keys win over every input before it and lose to every one after.
dictionary_uoptDICTDictionary 21. Its keys win over every input before it and lose to every one after.
dictionary_voptDICTDictionary 22. Its keys win over every input before it and lose to every one after.
dictionary_woptDICTDictionary 23. Its keys win over every input before it and lose to every one after.
dictionary_xoptDICTDictionary 24. Its keys win over every input before it and lose to every one after.

Outputs (1)

NameTypeDescription
DICTDICTA new dictionary holding every entry of the connected inputs. The inputs themselves are left alone.