ComfyUI Node

Ideogram Metadata Reader

Read the Prompt Back Out of an Image — With a Big Caveat

By SurrealByDesign·Created 2 months ago·Updated 2 months ago· 3
Ideogram Metadata Reader
  • image
  • prompt_json
  • status
embed_keyideogram_prompt

IdeogramMetadataReader is the recovery half of the pack's embed/recover loop: it pulls an embedded Ideogram JSON prompt back out of an image's PNG tEXt metadata by key. If you saved with IdeogramMetadataEmbedder, this is the node that lets you get the prompt back.

But there's a caveat the README leads with, and you should hear it before you build a workflow around this node: a ComfyUI IMAGE tensor carries no metadata. By the time an image has gone through a standard LoadImage → IMAGE path, the tEXt chunks have been stripped - the tensor is just pixels. So this node only recovers a prompt when the image still has its .info attached. That makes it more limited than it sounds at first glance, and the pack is refreshingly honest about it.

Inputs and outputs

  • image - an IMAGE.
  • embed_key (default "ideogram_prompt") - the metadata key to look up. Must match whatever key you embedded under; if you used a custom key on the embedder side, use the same one here.

Outputs: prompt_json (the recovered prompt string, or "" if nothing found) and status (a human-readable note on what happened - found, key missing, no metadata, etc.).

When it works vs. when it doesn't

The honest summary, straight from the README:

  • Works when the image reaches the node still carrying its .info - for example, an image that's passed through directly after generation in the same graph, or loaded through a node that preserves metadata.
  • Doesn't work through the standard LoadImage → IMAGE path, which strips tEXt chunks on the way to a tensor.

And that's precisely why the pack also ships IdeogramLoadImageWithPrompt, which loads a PNG from disk by path and recovers the prompt there. The README is explicit about which one actually works for reading saved files: the file-based loader is "the working counterpart." If your goal is "load a PNG I saved last week and get its prompt," use that node, not this one.

So where does this reader earn its keep? Inside a single graph where the image hasn't been round-tripped through a disk load - or as the second half of a two-reader setup like the Visual Prompt Designer's round-trip workflow, which runs two readers (one for the prompt key, one for the designer-state key) over images that still carry their metadata.

Installing it

Part of the pack. ComfyUI Manager: search "Ideogram Palette and Prompt Tools". Or:

cd ComfyUI/custom_nodes
git clone https://github.com/SurrealByDesign/ComfyUI-Ideogram-Palette-and-Prompt-Tools

Restart ComfyUI. Only extra dependency: scikit-learn (Manager handles it, or pip install scikit-learn). Nodes under Ideogram/Palette, Python ≥ 3.10, tested on ComfyUI 0.24.0 / Python 3.12.

Gotchas and troubleshooting

  • Empty prompt_json? Check the status output - it tells you whether the key was missing or the metadata never made it. If you loaded via stock LoadImage, that's your answer: metadata stripped.
  • Key mismatch? The reader and embedder must agree on embed_key. This is the most common self-inflicted miss.
  • JPEG won't work at all. The metadata lives in a PNG tEXt chunk; a JPEG has no such thing. Only PNG files written by the embedder (or equivalent) carry it.
  • Prefer the file loader for disk files. If you're reading saved files, reach for IdeogramLoadImageWithPrompt. This reader is for in-graph, metadata-still-attached use.
CategoryIdeogram/Palette

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
embed_keySTRINGideogram_prompt

Outputs (2)

NameTypeDescription
prompt_jsonSTRING
statusSTRING