Nodes/ComfyUI-mnemic-nodes/πŸ’Ύ Save Image With Metadata
ComfyUI Node

πŸ’Ύ Save Image With Metadata

A SaveImage that writes Civitai-readable generation data

By MNeMoNiCuZΒ·Created 3 years agoΒ·Updated 23 days agoΒ· 105
πŸ’Ύ Save Image With Metadata
  • images
    β—„filename_prefix%date:yyyy-MM-dd - hh.mm.ss%β–Ί
    β—„folder%date:yyyy-MM-dd%β–Ί
    β—„file_formatβ–Ύβ–Ί
    β—„quality100β–Ί
    β—„embed_workflowtrueβ–Ί
    β—„strip_lora_promptfalseβ–Ί
    β—„positive_overrideβ–Ί

    Stock SaveImage embeds ComfyUI's own workflow JSON into the file - great for reopening the exact graph later, less useful if you want a normal, human-readable "Steps: 20, Sampler: dpmpp_2m, Model: whatever.safetensors" block, the kind of metadata Civitai and most A1111-adjacent tools expect. This node writes that instead, auto-detected straight from your workflow, so you don't have to build it by hand. The pack credits it as adapted from ChronoKnight's Chrono-Save-for-Civitai node.

    How it works

    Only images actually needs connecting - the node walks the rest of your graph to auto-detect the checkpoint, sampler, seed, prompts, and LoRAs, and writes them out in Civitai-compatible form alongside the pixels. filename_prefix and folder both accept a shared token language - date tokens (%Y, %m, %d, and the bundled %date:yyyy-MM-dd - hh.mm.ss% style), plus %seed and %model for the resolved generation seed and model basename - so your output organizes itself automatically instead of everything landing in one flat folder.

    The inputs and outputs that matter

    • images - the only required connection.
    • filename_prefix (default %date:yyyy-MM-dd - hh.mm.ss%) and folder (default %date:yyyy-MM-dd%) - token-templated naming and subfolder placement.
    • file_format - png, jpeg, or webp.
    • quality - compression quality, 1–100.
    • embed_workflow (default true) - also keep the standard ComfyUI workflow JSON embedded alongside the Civitai-style metadata, so you get both.
    • strip_lora_prompt (default false) - drop LoRA tags out of the written prompt text.
    • positive_override (optional) - replace the auto-detected positive prompt with your own; accepts a single string applied to the whole batch, or a list of prompts matched one per image.

    No node outputs - like stock SaveImage, this is a terminal node.

    How to install it

    Via ComfyUI Manager: search ComfyUI-mnemic-nodes, install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MNeMoNiCuZ/ComfyUI-mnemic-nodes
    

    Restart ComfyUI. No model downloads or extra dependencies.

    Common issues & troubleshooting

    A detected field looks wrong or blank. Auto-detection reads your graph's structure to figure out the checkpoint/sampler/prompt, so a heavily rerouted or unusual workflow can occasionally trip it up. positive_override exists specifically for this - rather than fighting the auto-detect logic, override the field by hand when it guesses wrong.

    Testing jpeg/webp with metadata embedding. PNG has the most straightforward, well-supported path for embedded text metadata; not every image format handles it identically. If you're switching file_format away from the default, it's worth opening a saved file once in a metadata viewer to confirm the fields came through the way you expect.

    Why reach for this over the stock Save Image node? Specifically when you're planning to share or archive generations somewhere that reads Civitai-style resource metadata rather than ComfyUI's own graph format - you get both if you want them, since embed_workflow stays on by default alongside the new metadata this node adds.

    Category⚑ MNeMiC Nodes

    Inputs (8)

    NameTypeDefaultDescription
    imagesIMAGEβ€”
    filename_prefixSTRING%date:yyyy-MM-dd - hh.mm.ss%Filename prefix template. %Y: Year (e.g., 2025) %m: Month (01-12) %d: Day of month (01-31) %H: Hour (24-hour clock) (00-23) %M: Minute (00-59) %S: Second (00-59) %f: Microsecond (000000-999999) %x: Date representation %X: Time representation %c: Date and time representation %p: AM/PM %A: Weekday full name (e.g., Thursday) %a: Weekday abbreviated name (e.g., Thu) %B: Month full name (e.g., August) %b: Month abbreviated name (e.g., Aug) %j: Day of year (001-366) %W: Week number of year (Monday as first day) (00-53) %w: Day index of week (Monday is 0) (0-6) %U: Week number of year (Sunday as first day) (00-53) %u: Day index of week (Sunday is 0) (0-6) %%: A literal '%' character %date:yyyy-MM-dd - hh.mm.ss%: custom date token style %seed: resolved generation seed %model: resolved model basename
    folderSTRING%date:yyyy-MM-dd%Subfolder under ComfyUI output directory. %Y: Year (e.g., 2025) %m: Month (01-12) %d: Day of month (01-31) %H: Hour (24-hour clock) (00-23) %M: Minute (00-59) %S: Second (00-59) %f: Microsecond (000000-999999) %x: Date representation %X: Time representation %c: Date and time representation %p: AM/PM %A: Weekday full name (e.g., Thursday) %a: Weekday abbreviated name (e.g., Thu) %B: Month full name (e.g., August) %b: Month abbreviated name (e.g., Aug) %j: Day of year (001-366) %W: Week number of year (Monday as first day) (00-53) %w: Day index of week (Monday is 0) (0-6) %U: Week number of year (Sunday as first day) (00-53) %u: Day index of week (Sunday is 0) (0-6) %%: A literal '%' character %date:yyyy-MM-dd - hh.mm.ss%: custom date token style %seed: resolved generation seed %model: resolved model basename
    file_formatCOMBO3 options: png, jpeg, webp
    qualityINT1001–100β€”
    embed_workflowBOOLEANtrueInclude workflow in the image.
    strip_lora_promptBOOLEANfalseStrip LoRAs from prompt.
    positive_overrideoptSTRINGOverride the auto-detected positive prompt. Accepts a single string (applied to every image) or a list of prompts (one per image, looping if the count differs from the number of images).

    Outputs (0)

    No outputs