Nodes/Save Prompt And Output/Save Image With Prompt
ComfyUI Node

Save Image With Prompt

Every PNG that leaves your machine should remember what made it

By t22m003·Created 9 months ago·Updated 9 months ago· 0
Save Image With Prompt
  • images
    filename_prefixComfyUI_Custom
    save_prompttrue
    save_extra_pnginfotrue

    ComfyUI's stock Save Image already embeds the whole workflow graph into your PNG as prompt metadata - that's how you can drag a PNG back onto the canvas and get the workflow. What it doesn't do is save the raw prompt text in a way that's readable without loading the graph back in. Save Image With Prompt is the replacement that writes your positive and negative prompts, a caption, and (via the graph) everything else as plain text tags you can read in any image viewer.

    Class SaveImageWithPrompt, category image, an output node like the core saver. The inputs, in the order you'll actually use them:

    • images - the IMAGE tensor from your VAE Decode.
    • filename_prefix - folder/filename prefix, same as stock. Spaces become underscores and it's capped at 180 characters.
    • positive_prompt and additional_prompt - the two positive-text fields. Yes, two: the author's design is positive plus an "additional" prompt, and both get written to metadata separately, alongside the negative.
    • negative_prompt - the other half of the story.
    • caption - a free-form field for your own notes; whatever you type lands in the PNG's caption tag.
    • numbers - a boolean toggle (default on) that appends a counter to the filename so you never overwrite the previous render.

    Nothing comes out; the ui result just reports the saved files so the browser can show them.

    Why you'd swap your normal saver for it

    The pitch is metadata hygiene. Stock ComfyUI writes the workflow JSON; this writes also the human-readable prompt, negative, and caption as named text chunks. Open the PNG in anything that reads Exif/PNG text and you'll see positive_prompt, negative_prompt, caption sitting there in plaintext. For people who curate outputs, feed them into training scrapers, or just want to know what they made six months later, that's the difference between archaeology and a filing system. The standard workflow-prompts are still embedded too (the node passes through the hidden prompt and extra_pnginfo), so nothing you're used to is lost.

    Install

    ComfyUI Manager (search "Easygoing Nodes"), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/easygoing0114/ComfyUI-easygoing-nodes.git
    

    Restart. Zero pip dependencies in the pack - it only uses what ComfyUI already ships.

    Gotchas

    Two things trip people up. First: the prompt fields are strings you type, not magic wires - this node doesn't read your KSampler's prompt automatically. If you want the prompts from elsewhere in your graph, wire string outputs in or accept the typing. Second: it respects ComfyUI's --disable-metadata flag; if you launch with that, no metadata of any kind gets written and the node silently behaves like a plain saver. The pack's sibling loader nodes (Load Checkpoint / Load Diffusion Model with Name) feed this node's philosophy well - model name in metadata, prompt in metadata, and suddenly your output folder is self-documenting.

    CategoryCustom/Save

    Inputs (4)

    NameTypeDefaultDescription
    imagesIMAGE
    filename_prefixSTRINGComfyUI_Custom
    save_promptBOOLEANtrue
    save_extra_pnginfoBOOLEANtrue

    Outputs (0)

    No outputs