Nodes/ComfyUI Prompt Saver/Save Image + Prompt Reference
ComfyUI Node

Save Image + Prompt Reference

Turn your output folder into a prompt gallery

By robomello·Created 7 months ago·Updated 7 months ago· 0
Save Image + Prompt Reference
  • images
  • images
  • saved_path
prompt
filename_prefixprompt_ref
thumbnail_size512
save_full_imagetrue
save_reference_cardtrue
save_jsontrue
negative_prompt
extra_metadata

ComfyUI's built-in Save Image is clever in a way that doesn't help you browse. It embeds the whole workflow as PNG metadata - drag the file back in and the graph reconstructs - but the prompt itself is invisible in a file manager. Scroll through a month of output and every image is a mystery. This node, the only one in the robomello/comfyui-prompt-saver pack, fixes that the blunt way: it saves your image and a second PNG that looks like a recipe card - thumbnail on the left, your prompt in color-coded text on the right. Your output folder becomes a prompt gallery you can actually read.

Who this is actually for

The README's own example is a JSON prompt ("scene": "mountain landscape", "style": "oil painting"…), and that tells you the target user. This is built for people feeding structured, LLM-generated prompts into models that like them - Flux, Anima, Chroma, anything Qwen-based. JSON isn't magic, but it gives an LLM clean field separation, and this node treats that JSON as a first-class citizen: it parses it, pretty-prints it with indentation, and colors keys, values and braces differently on the card. The README's phrase is "exactly as sent to the LLM," and that's the selling point - for once, what you generated with is what you see later. If you write plain comma prompts, it works fine too; it just renders the raw text with no highlighting.

How it works

Everything lands in ComfyUI/output/prompt_references/, named {prefix}_{timestamp}_{index}. Depending on which of the three save toggles you leave on, you get a _full.png (the actual image), a _ref.png (the card), and a .json sidecar holding the cleaned prompt, timestamp, original size and thumbnail size.

The card is the interesting bit. The text column is a fixed 700px wide, and the node figures out the font size by brute force: it starts at 24pt and steps down until every line of the wrapped prompt fits the available height, then draws it with a deliberately simple line-based highlighter. Before that, a clean_prompt() pass strips outer quotes and unescapes \n, \" and \\ so an escaped JSON blob becomes readable text instead of a wall of backslashes.

The inputs that matter

Only a couple need your attention:

  • images - your IMAGE output, required.
  • prompt - the prompt string, required. Note this node does not auto-extract your prompt from the graph; you wire a STRING in, so if you're using an LLM prompt-builder node, feed its JSON output straight here.
  • save_full_image / save_reference_card / save_json - three booleans, all on by default. Flip them if you only want the card, say.
  • filename_prefix (default prompt_ref) and thumbnail_size (128–1024, default 512) are self-explanatory.

The optional negative_prompt and extra_metadata go into the JSON sidecar only. Outputs are images (a passthrough, so you can keep wiring downstream) and saved_path - a comma-separated string of the absolute paths it just wrote.

Installing it

Dead simple, and that's the nicest thing about this pack. ComfyUI Manager → search "Prompt Saver" → install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/robomello/comfyui-prompt-saver

Restart ComfyUI and find "Save Image + Prompt Reference" under image/save. Requirements are just Pillow and numpy, which are already in ComfyUI's environment - no model downloads, no torch hell. It's a single MIT-licensed Python file from a lone author (Roberto de Mello), so the usual custom-node security caveat barely applies, though the ecosystem rule stands: install via Manager, from known repos.

Where people get burned

  • Windows font fallback. The card's font paths are hardcoded to Linux DejaVu paths; on Windows it silently drops to Pillow's built-in bitmap font, which ignores font_size - cards still render, but text sizing goes weird. If you're on Windows and cards look off, that's why.
  • negative_prompt isn't on the card. The function accepts it, then never draws it. It's in the JSON. Expecting it on the card is a reasonable hope that isn't honored.
  • The highlighting is cosmetic. It's line-based ("contains ": → key color"), not a real JSON renderer. Fine for skimming, not a debugging tool.
  • Per-second timestamps. Two runs in the same second produce the same filename. Unlikely, but it will silently overwrite.

Is it a must-have? No. It's a niche, 26-impressions utility with a single audience. But if you're on Linux, use LLM-style structured prompts, and hate hunting through raw PNGs - it earns its keep in one run.

Categoryimage/save

Inputs (9)

NameTypeDefaultDescription
imagesIMAGE
promptSTRING
filename_prefixSTRINGprompt_ref
thumbnail_sizeINT512128–1024
save_full_imageBOOLEANtrue
save_reference_cardBOOLEANtrue
save_jsonBOOLEANtrue
negative_promptoptSTRING
extra_metadataoptSTRING

Outputs (2)

NameTypeDescription
imagesIMAGE
saved_pathSTRING