Ideogram Metadata Embedder
Make the Prompt Travel With the Image, Forever
- image
- metadata_preview
ComfyUI has a culture of "workflow included" - the workflow is embedded in the PNG, and the image itself becomes the shareable artifact. IdeogramMetadataEmbedder is that idea taken one step further for this pack: it saves your generated image with the full Ideogram 4 JSON prompt embedded in the PNG metadata, so the exact prompt - palette, elements, everything - travels with the file.
This is a terminal save node. You wire it where you'd normally put a SaveImage - after your sampler's VAEDecode - and it takes over the save. That's not a design quirk; it's physics. ComfyUI's IMAGE type is a bare tensor with no metadata slot, so the prompt can only be attached at the moment the file is written. The node owns the save because it's the only place the metadata can actually land.
Inputs
image- the IMAGE to save.prompt_json- the Ideogram JSON to embed, usually the validated output of the assembler/validator chain.filename_prefix(default"ideogram") - the output filename prefix, same idea as stockSaveImage.embed_key(default"ideogram_prompt") - the metadata key the prompt is stored under. If you're also round-tripping designer state, you can run a second embedder with a different key like"ideogram_designer_state".
Output: metadata_preview - a confirmation string (the node also previews the saved image). Nothing to wire onward; this node terminates the chain.
What it preserves
Two layers of metadata, and both matter. Your Ideogram prompt goes into a PNG tEXt chunk under your embed_key, and - the part people don't expect - it *also preserves ComfyUI's normal prompt/workflow metadata. So the saved PNG stays fully reproducible in ComfyUI: drag it back onto the canvas and your whole graph reconstructs, and the Ideogram prompt comes back with it. The node builds a PngInfo object that carries both.
Recovering it later
The counterpart is IdeogramMetadataReader (works only when the image still carries its .info, which a normal LoadImage → IMAGE path strips) - or, for the path that actually works in practice, IdeogramLoadImageWithPrompt, which reads straight from the file on disk. The pack's showcase showcase_05_embed_recover_roundtrip.json runs the whole loop.
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 auto-installs 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
tEXtis a PNG feature, and only PNG. Re-save the file as JPEG and the embedded prompt is gone, permanently. If you're shipping files that will be converted, this whole round-trip idea breaks - keep a PNG master.- Wired it up and no file appears? Check
filename_prefixisn't pointing somewhere weird and that you're saving to the output directory ComfyUI expects (it uses the standard output dir, same asSaveImage). - The prompt must be a JSON string, not a bare array. The
prompt_jsoninput wants the full prompt object. A palette array alone will embed but won't reconstruct a usable prompt. - This replaces
SaveImage, it doesn't accompany it. Use one or the other, not both - double-saving is just wasted disk and a second file without your prompt.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| prompt_json | STRING | — | |
| filename_prefix | STRING | ideogram | — |
| embed_key | STRING | ideogram_prompt | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| metadata_preview | STRING | — |