ComfyUI Node

FD Image Save

Save a PNG with the prompt and the whole workflow baked in

By Feidorian·Created 3 years ago·Updated 7 months ago· 5
FD Image Save
  • images
    sub_dir
    opt_Filename
    prompt_text
    with_workflowtrue

    ComfyUI's built-in SaveImage is fine, but it has a habit of losing your context: you save a batch, come back a week later, and have no idea which prompt or workflow produced which file. Feidorian_ImageSave (FD Image Save) is the same save-the-image job with the context included - it writes your PNG and the prompt text and the entire workflow graph into the file's metadata, and it lets you pick your own filename and subfolder while it's at it.

    It's the standalone cousin of the FD workflow-manager savers. Those two insist on naming files after the source image and sharing state with a loader; this one is a drop-in replacement for SaveImage that just adds options. No loader required, no pair, no state machine.

    How it works. Straightforward: it takes the IMAGE tensor, converts it back to a PIL image, and saves it as a PNG. What makes it worth having is the metadata. If you fill in prompt_text, that string is embedded as a prompt_text PNG text chunk. If with_workflow is on (the default), the full workflow JSON - the prompt structure plus any extra pnginfo - is written in too. Open that file in any workflow that reads PNG metadata, or just load it back into ComfyUI, and the whole graph comes with it.

    Inputs that matter. Five:

    • images (required) - what you're saving.
    • sub_dir - a subfolder under ComfyUI/output. Empty string saves straight to output.
    • opt_Filename - your own name for the file. Leave it empty and you get a timestamp (YYYYMMDD-HHMMSS) instead.
    • prompt_text - the caption embedded in the metadata.
    • with_workflow - embed the workflow JSON.

    There are no outputs; it's an output node, the end of the pipeline.

    Where people get burned. The filename input has no dedup logic. Give it opt_Filename = "hero" and run twice, and the second run overwrites the first - there's no _00001_ counter like the core SaveImage appends. If you're saving multiple runs, either leave the name blank for timestamps or bump the name yourself each run. Second, with_workflow on adds size and embeds your whole graph in every file - fine for provenance, slightly wasteful if you're dumping hundreds of images. And third, this is from an archived pack, so don't expect the behavior to change.

    Install. ComfyUI Manager (search "feidorian-ComfyNodes"), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Feidorian/feidorian-ComfyNodes
    

    Restart ComfyUI and it appears under the "FD" prefix. No dependencies, no model files - one of the least painful custom-node installs you'll do, which matters because the pack is long archived and installs aren't getting more polished.

    Categoryfeidorian/output

    Inputs (5)

    NameTypeDefaultDescription
    imagesIMAGE
    sub_dirSTRING
    opt_FilenameSTRING
    prompt_textSTRING
    with_workflowBOOLEANtrue

    Outputs (0)

    No outputs