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

Text Dictionary New

The node that starts WAS's whole dictionary family

By WASasquatch·Created 3 years ago·Updated about 13 hours ago· 1,840
Text Dictionary New
  • value_1
  • value_2
  • value_3
  • value_4
  • value_5
  • value_6
  • value_7
  • value_8
  • value_9
  • value_10
  • value_11
  • value_12
  • value_13
  • value_14
  • value_15
  • value_16
  • value_17
  • value_18
  • value_19
  • value_20
  • value_21
  • value_22
  • value_23
  • value_24
  • DICT
key_1
key_2
key_3
key_4
key_5
key_6
key_7
key_8
key_9
key_10
key_11
key_12
key_13
key_14
key_15
key_16
key_17
key_18
key_19
key_20
key_21
key_22
key_23
key_24
list_valueslist literal

Every other node in WAS's dictionary toolkit assumes a dictionary already exists somewhere in your graph. Text Dictionary New is where that assumption becomes true - per the README, it does exactly what it says: "create a new dictionary." It's the starting node, not a fancy one.

Why you'd want a dictionary at all

If your workflow is one prompt and one output, you don't need this. Where it earns its place is once you're assembling a prompt (or a filename, or any bundle of related text) out of labeled parts instead of one long string you keep hand-editing. Build {"subject": "a fox", "style": "watercolor", "lighting": "golden hour"} once, and the rest of the graph can pull subject here and lighting there instead of you scrolling through a monolithic text box hunting for the phrase you want to change. It's structured data in a tool that's otherwise all wires and strings.

Once you have that dictionary object, the rest of the family takes over: Text Dictionary Update merges another one into it, Text Dictionary Keys lists what's in it, Text Dictionary Get pulls a single value back out as a string, and Text Dictionary To Text dumps the whole thing to readable text if you want to save or inspect it. None of those work without something like this node making the first one.

How it works

It constructs a DICT-type object - the same object the rest of WAS's dictionary nodes read and write - from whatever key/value pairs you give it on the node itself. That's the mechanism: you're building a dictionary by hand, entry by entry, directly in the graph, rather than parsing one out of loaded text (that's Text Dictionary Convert's job) or merging two existing ones (Text Dictionary Update).

The inputs and outputs that matter

I don't have a formal schema in front of me for the exact key/value fields this node exposes, so treat the shape as "however many key/value pairs the node gives you to fill in on the canvas," not a confirmed field count. What's certain from the README and the rest of the family: what comes out the other side is a single DICT object, ready to plug straight into Text Dictionary Update, Text Dictionary Get, or Text Dictionary Keys.

How to install it

Comes 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. No model, no GPU - pure string/data handling.

Common issues & troubleshooting

Downstream nodes reject the output. Make sure you're wiring the DICT output into a node that actually expects a dictionary (Get, Keys, Update, To Text) - plugging it into a plain text input won't work, since it isn't a string until you explicitly convert it with Text Dictionary To Text.

A key you set here isn't showing up later. If you're also running the dictionary through Text Dictionary Update downstream, remember merges can overwrite keys that collide - check the merge order if a value looks wrong rather than assuming this node dropped it.

Whole pack fails to load. The standard WAS gotcha: it's been unmaintained since December 2023, and a ComfyUI update can leave its pinned dependencies out of sync, throwing "Import Failed" for every WAS node at once, this one included. Reinstall requirements.txt against your actual ComfyUI Python interpreter and restart.

CategoryWAS Suite/Text/Dictionary

Inputs (49)

NameTypeDefaultDescription
key_1STRINGKey name for value_1; STRING. Text Find and Replace by Dictionary swaps __key__ in a prompt for the value. Eg: animal
value_1STRING,ARRAY,DICTValue for key_1; STRING, LIST or DICT literal, or LIST or DICT by connection. A connection ignores list_values. Eg: a tabby cat
key_2optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_2optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_3optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_3optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_4optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_4optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_5optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_5optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_6optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_6optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_7optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_7optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_8optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_8optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_9optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_9optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_10optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_10optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_11optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_11optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_12optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_12optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_13optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_13optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_14optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_14optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_15optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_15optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_16optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_16optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_17optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_17optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_18optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_18optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_19optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_19optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_20optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_20optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_21optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_21optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_22optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_22optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_23optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_23optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
key_24optSTRINGKey name, such as `subject` or `style`; STRING. Empty keys are skipped.
value_24optSTRING,ARRAY,DICTValue for the key beside it; STRING, LIST or DICT literal, or LIST or DICT by connection.
list_valuesoptCOMBOlist literalHow a typed value becomes a LIST. `list literal`: reads ['a cat', 'a wolf'], anything else stays STRING. `one per line`: each line is an item, one line stays STRING. `off`: always STRING. Connections ignore this.

Outputs (1)

NameTypeDescription
DICTDICTThe DICT, for Text Find and Replace by Dictionary, Text Dictionary Get and the other DICT nodes. Duplicate keys keep the last value.