Nodes/🗂️ Dict Tools/📃Text → Dict🗂️ [OLD]
ComfyUI Node

📃Text → Dict🗂️ [OLD]

Text → Dict, first generation (look for the 'strings' input)

By Lex-DRL·Created 4 months ago·Updated 4 months ago· 1
📃Text → Dict🗂️ [OLD]
  • dict
  • dict
cleanuptrue
strings
show_statusfalse

The String Constructor era's Text → Dict

📃Text → Dict🗂️ [OLD] is the oldest alias of the pack's flagship parser. Under the hood it's the same TextToDict code - it turns a wall of text into a dict of named strings - but it registers under the ID it had before the 🗂️ Dict Tools pack existed, when these nodes were supporting utilities inside Lex Darlog's String Constructor pack. Its purpose in life today is keeping old saved workflows alive.

What it does

Same parsing as the modern node. Paste a block of text where keys sit on their own line and their values on the following lines, separated by blank lines, and it becomes a dict:

char1_short
1boy, blond, short hair

char1_long
1boy, smiling, blue eyes, blond, short hair,
wearing a leather jacket, sitting on a bike

That produces two entries - char1_short and a two-line char1_long.

The inputs are where this legacy node differs from its modern sibling, because the old names survive here:

  • strings - the text to parse. In the modern node this is called dict_text.
  • cleanup - on by default; strips each line of leading/trailing spaces before parsing. Modern name: pre_cleanup.
  • show_status - off by default; turn it on to see the detected keys on the node.
  • dict - optional; pass an existing DICT in and the parsed items merge on top.

The dict output is the result. It's marked as an output node so the status message shows even with nothing connected.

The naming trap

If you're reading a tutorial from the String Constructor era and it tells you to use the "strings" input, this is the node it means - the input is literally called strings here. The other old alias, DictFromText [Dict Tools], kept the modern names (dict_text, pre_cleanup) while only the ID stayed old. Same parser, different labels. It's confusing, but harmless: both are just TextToDict with a renamed input mapping.

Installing it

Same pack as everything else. ComfyUI Manager, search Dict Tools (Lex-DRL/ComfyUI-DictTools), or:

cd ComfyUI/custom_nodes
git clone https://github.com/Lex-DRL/ComfyUI-DictTools

Restart ComfyUI. Only dependency is frozendict; no models to download. Requires ComfyUI >= 0.18.0 - if the nodes don't register after install, update ComfyUI first.

What to actually do

Start new graphs with 📃Text → Dict🗂️ (TextToDict) from the pack's root category - it's the current name with the current input names. Leave this legacy node alone in old workflows; it parses identically and swapping it buys nothing. And if you ever see both this and DictFromText [Dict Tools] in a graph, that's just the same node registered twice under different legacy IDs, not two competing features.

Category🗂️ Dict Tools/_old

Inputs (4)

NameTypeDefaultDescription
cleanupBOOLEANtrueWhen enabled, each line is individually pre-stripped of any leading/trailing spaces before parsing the text.
stringsSTRINGA wall of key-value pairs: • keys (item names) on their own line, • followed by their text. Different items are separated by empty lines.
show_statusBOOLEANfalseShow detected string names on the node itself?
dictoptDICTAn (optional) Dictionary to work with.

Outputs (1)

NameTypeDescription
dictDICT