Nodes/Save Image (XMP)/Save Image (XMP)
ComfyUI Node

Save Image (XMP)

Keep your workflow attached — even when you save as JPEG

By connerkward·Created 6 months ago·Updated 2 months ago· 1
Save Image (XMP)
  • images
    filename_prefixComfyUI-XMP
    author
    format
    quality95
    sidecar_xmpfalse
    json_metadata

    ComfyUI's stock Save Image is great at one thing and quietly bad at one thing. It embeds your entire workflow in the PNG - drag the image back in and the graph rebuilds, that famous trick that made "workflow included" a community norm. But switch to JPEG or WebP and all of that silently evaporates. The defaults don't even offer those formats, and anyone archiving thousands of PNGs as JPEGs finds the recipe is gone after conversion.

    Save Image (XMP) is a drop-in replacement that plugs the hole. It writes PNG, WEBP, or JPEG and attaches the workflow graph, the prompt graph, SHA256 hashes of every model you used, and whatever JSON you hand it - in XMP, a metadata standard that survives Photoshop, Lightroom, file transfers, and format conversion instead of dying with the PNG.

    If you generate, close the tab, and never touch the output again, the stock node is fine. If you share, iterate, or archive, this is the save node you want. It's the pack's flat-image workhorse; the same pack's Save Layered TIFF (XMP) handles the multi-layer case.

    How it works

    The node catches the run graph through ComfyUI's hidden prompt and extra_pnginfo wires, serializes the workflow JSON, then scans that graph for string inputs that resolve to real files in your model folders. Every match gets SHA256-hashed - cached per session, so the first save after adding a model pauses for a beat and everything after is instant. All of that goes into an XMP packet: comfy:workflow, comfy:prompt, comfy:models, comfy:json, plus your author name. PNG files additionally keep the native tEXt workflow/prompt chunks, so the classic drag-back reload keeps working there.

    The inputs that matter:

    • format - PNG, WEBP, or JPEG. PNG stays lossless and reloadable; WEBP/JPEG get XMP only.
    • quality - 1–100, default 95. Only lossy formats use it; set it on PNG and it's politely ignored.
    • json_metadata - arbitrary JSON string stored in comfy:json. Pipe a seed/params dump from a text node in and it travels with every file.
    • author - lands in dc:creator, which shows up in macOS Get Info and Windows file properties.
    • sidecar_xmp - also writes a matching .xmp file beside the image, for tools that read sidecars.
    • filename_prefix - defaults to ComfyUI-XMP; files come out ComfyUI-XMP_00001.png and auto-increment, never overwriting.

    Feed it a batch and it saves every frame as its own file.

    Installing it

    ComfyUI Manager: search "Save Image (XMP)" and hit Install, then restart. Or the manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/connerkward/comfyui-save-image-xmp.git
    

    Then restart. This node itself needs nothing beyond Pillow, which ComfyUI already ships - the pack's one real extra dependency, tifffile, is only for the TIFF node.

    Common issues

    The thing that trips people up: you save as JPEG, drag it back into ComfyUI, and nothing happens. That's not a bug - native workflow reload is a PNG feature, and JPEG can't carry it. The workflow is still in there via XMP (exiftool or the author's companion comfy-viewer can read it), you just can't drag-drop a JPEG to rebuild the graph. If you need one-click reload, save PNG.

    The flip side is the point: XMP survives the conversions that kill PNG's tEXt chunks, which is exactly why this node exists for people who archive or deliver in non-PNG formats.

    Categoryimage

    Inputs (7)

    NameTypeDefaultDescription
    imagesIMAGE
    filename_prefixSTRINGComfyUI-XMP
    authorSTRING
    formatCOMBO3 options: PNG, WEBP, JPEG
    qualityINT951–100
    sidecar_xmpBOOLEANfalse
    json_metadataoptSTRING

    Outputs (0)

    No outputs