Nodes/Save Separate Metadata/Save JPG (Separate Meta)
ComfyUI Node

Save JPG (Separate Meta)

The JPG that remembers its own workflow

By Kuroi961·Created 4 months ago·Updated 4 months ago· 0
Save JPG (Separate Meta)
  • images
    filename_prefixComfyUI
    quality95

    ComfyUI's whole save system is built on one assumption: the image file is the project file. Drag a generated PNG back onto the canvas and the node graph reassembles - prompt, seed, wiring, everything - because ComfyUI baked the workflow into the PNG's text chunks. That's genuinely cool, and it's also fragile. Re-encode to JPG, screenshot it, or push it through a host that recompresses, and the recipe is gone for good. JPEG has no PNG text chunks. The workflow dies at the format boundary.

    Save JPG (Separate Meta) is one of three save nodes in Kuroi961's ComfyUI-Save-Separate-Metadata pack that get around that wall with a sidecar. Instead of trying to stuff a graph into a format that can't hold it, this node writes a normal, clean JPG and drops the workflow into a matching JSON file right next to it:

    output/
    └── 2026-05/
        ├── image_00001_.jpg
        └── .meta/
            └── image_00001_.json
    

    That .meta/image_00001_.json contains the same prompt and workflow data ComfyUI's default SaveImage would have embedded - the pack captures ComfyUI's internal prompt and extra workflow info and serializes it to a file instead of into PNG chunks. Because the payload is the standard one, restore works the normal way: drag the JPG back onto the canvas and the extension fetches the sidecar and rebuilds the graph. Or drag the .json directly, which works even when the image lives somewhere the automatic lookup can't reach.

    Three inputs, that's it. images is the batch you're saving. filename_prefix is the standard ComfyUI template - default ComfyUI with the auto-incrementing counter, but it takes the usual tokens (%date:yyyy-MM-dd%, %NodeName.widget%-style values pulled from other nodes) and subfolders via a slash. And quality, the 1–100 JPG slider, default 95, saved with optimize=True. It's an output node with no outputs to wire: it just does its job at the end of the graph.

    Install is one of the easier ones. ComfyUI Manager, search "Save Separate Metadata", install, restart. Manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Kuroi961/ComfyUI-Save-Separate-Metadata.git
    

    No model downloads, no extra pip packages - the whole pack runs on PIL and numpy, which ComfyUI already ships.

    Where people get burned: the sidecar only stays in sync if it stays with the image. Move a JPG around in your OS file manager and the .meta file gets left behind, because only ComfyUI (and the optional ComfyUI-Drawer gallery, which syncs sidecars on move/rename/delete) monitors file operations. Dot-folders like .meta are hidden by some tools, which reads as "where did my metadata go." Sidecars are matched by filename stem, so don't keep image.jpg and image.png in the same folder unless you want them sharing one sidecar. Two more worth knowing: if ComfyUI is launched with metadata disabled (--disable-metadata), no sidecars are written at all, and if you drag in an image and the extension finds several sidecars with the same name under output, it refuses to guess rather than restore the wrong workflow - drag the exact .json in that case.

    Is this for everyone? No. If you live on PNG masters and never convert, the default SaveImage is simpler. But if you deliver JPGs - for posting, for clients, for a web gallery - this is the only way to keep the graph alive on the other side of the format boundary. Small pack, one job, done cleanly.

    Categoryimage

    Inputs (3)

    NameTypeDefaultDescription
    imagesIMAGE
    filename_prefixSTRINGComfyUI
    qualityINT951–100JPG quality (1-100).

    Outputs (0)

    No outputs