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

Text Dictionary To Text

Dump a dictionary back out as plain text

By WASasquatch·Created 3 years ago·Updated about a year ago· 1,812
Text Dictionary To Text

      The reverse of building a dictionary: this takes a dictionary object and serializes the whole thing back to text. Every key and value, rendered as a string. The pack's description is a single line - "returns the dictionary as text" - and that's exactly what it does.

      Where Text Dictionary Get pulls one value out, this dumps the entire structure. It's the node you use when you want to see what's in a dictionary, save it to a file, or pass the whole assembled thing into something that expects text rather than a dict.

      Why you'd reach for it

      Two honest reasons, and they're both practical:

      Debugging. WAS dictionaries are opaque while they're flowing through wires - you can't see inside them. When a dictionary-driven prompt isn't coming out right, To Text lets you render the whole thing and eyeball it. It's the print-statement of the WAS dictionary world. Wire it to a Show Text or a preview and you can finally see what you actually built.

      Serialization. If you've assembled structured prompt data across several Dictionary nodes and now want to persist it - save it to a text file, embed it in an image's metadata, log it alongside your output - you need it as text first. To Text is that conversion.

      How it works

      It walks the dictionary and formats its key/value pairs into a single text representation. No transformation of the underlying data - it's just rendering the structure into readable/storable string form.

      The inputs and outputs that matter

      • dictionary - the DICT object to render, produced by Text Dictionary New, Convert, Update, or one of the pack's file loaders.

      The output is a STRING containing the whole dictionary. From there it goes to a Save Text File node, a text preview, a find-and-replace step, or anywhere a string is welcome.

      Installing it

      Ships with WAS Node Suite. ComfyUI Manager: search WAS Node Suite, install, restart. Or by hand:

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

      install requirements.txt against your ComfyUI Python, restart.

      Common issues

      The output doesn't round-trip cleanly back into a dictionary. The text form is for reading and saving, not necessarily a guaranteed exact re-parse. If you want to reconstruct a dict from text, use Text Dictionary Convert, and test that your formatting survives the round-trip before relying on it.

      It's not what I expected to see. The rendering shows the dictionary's actual contents - if that's not what you thought you built, the bug is upstream in how the dictionary was assembled, and now you can see it. That's the node doing its most useful job.

      All the dictionary nodes vanished at once. That's the whole pack failing to import, not this node. WAS Node Suite is retired and unmaintained since late 2023; after a ComfyUI update its dependency pins can collide and the suite throws "Import Failed," taking every WAS node down together. Reinstall the pack's requirements against the correct ComfyUI venv (the bundled install.bat finds it) to restore them.

      This only earns its place if you're actually using WAS's dictionary system to build prompts from labeled parts. If you are, To Text is the node that lets you inspect and save the result. If you're not, you'll never miss it.

      Categoryx

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs