Nodes/Gprompts/Save Image With Notes
ComfyUI Node

Save Image With Notes

Save the image, and actually keep the prompt that made it

By GadzoinksOfficial·Created about a year ago·Updated 3 months ago· 3
Save Image With Notes
  • image
  • notes
  • computed_prompt
    filename_prefixComfyUI

    Drag a ComfyUI PNG back into the UI and you get the workflow graph - the wiring, the widget values, everything except a straight answer about what you actually asked for. Save Image With Notes is the fix: it's a stock Save Image that also pins your prompt to the image, in plain text, in a way you can read back. No external database, no sidecar files, no API. Just the PNG and a Note node that rides along inside its embedded workflow.

    What it actually does

    Under the hood it's not much more than ComfyUI's built-in SaveImage with one extra step. Before saving, it takes the workflow JSON that ComfyUI embeds in every PNG, injects a Note node containing your text, and then hands the whole thing to the regular save routine. When you later drag that PNG onto the canvas, the note is sitting there on the graph, readable.

    Give it a computed_prompt from the pack's GPrompts node and it does two things at once: it writes that prompt into the image's PNG metadata and builds a note that reads Image created with prompt "...". Wire String Formatter into the notes input instead and your custom text becomes the note. Use one or the other - if both are connected, computed_prompt wins.

    That extra computed_prompt metadata is the bit that makes the pack's Batch Image Loader able to hand you the prompt back on its own output later. Save here, reload with load_exif on, and the round trip closes.

    Inputs

    Only three you'll ever touch:

    • image - the tensor to save. That's it.
    • filename_prefix - works like the core Save Image prefix, with one quirk: the node prepends a YYYY-MM-DD/ date folder unless your prefix contains a %. So %Y%m%d style strftime strings are treated as already-formatted and skipped. The tooltip mentions $variables for dynamic naming, but in the shipped code the %-guard is the only formatting logic - don't count on $date working here; that's what String Formatter is for.
    • notes / computed_prompt - the text that becomes the embedded note. Either is a wildcard * input, so anything that resolves to a string plugs in.

    There are no outputs. It's an output node; the image goes to disk and that's the end of the line.

    Install

    It ships in the Gprompts pack, so this is a one-time install shared with the other three nodes:

    cd ComfyUI/custom_nodes
    git clone https://github.com/GadzoinksOfficial/comfyui_gprompts
    

    then restart. ComfyUI Manager users can search "Gprompts" instead. The only dependency is pillow (already present), no model downloads, MIT licensed.

    Why you'd bother

    If you generate a lot and rarely go back to the files, skip it. But the moment you're curating, upscaling old batches, or trying to reproduce something from three weeks ago, the difference between "prompt buried in a graph JSON I have to reverse-engineer" and "note sitting on the canvas" is real. It also slots into a self-contained metadata loop: GPrompts → this node → disk → Batch Image Loader, and the exact text that made the image survives the whole trip.

    Where people get burned

    • computed_prompt needs an actual value. If it's wired but the upstream GPrompts node didn't produce anything, no note is created and it saves like a plain Save Image - which is at least a graceful failure, but check your wire.
    • The note only embeds when the PNG carries a workflow. It always does with normal ComfyUI saving, but if some other node stripped the metadata upstream, the note has nowhere to live.
    • Don't expect $-expansion in filename_prefix just because the tooltip says so - the code's %-guard is what's real, and String Formatter exists precisely for building dynamic text.
    Categoryimage

    Inputs (4)

    NameTypeDefaultDescription
    imageIMAGEInput image to save with metadata
    filename_prefixSTRINGComfyUIPrefix for the output filename (supports $variables for dynamic naming)
    notesopt*Text for notes node that is embedded in saved image
    computed_promptopt*The computed prompt from Gprompts Node to embed in saved image (use this OR notes)

    Outputs (0)

    No outputs