ComfyUI Node

Save WEBP Meta

Save images that actually remember their recipe

By ukr8b3g-cmyk·Created 3 months ago·Updated 2 months ago· 2
Save WEBP Meta
  • images
    filename_prefixcomfy_%model%_%date%
    file_formatwebp
    quality70

    Here's the thing about ComfyUI's default Save Image: it embeds the full workflow in PNGs, sure, but only if the receiving app knows what to look for. Drag a default output into a browser, a gallery, or an A1111-based tool and the prompt stays invisible. Save WEBP Meta is the node that stops that. It's an output node that writes both kinds of metadata people actually want - ComfyUI's own prompt/workflow for drag-and-drop restore, and an A1111-compatible parameter string - into WebP, PNG, JPG, or AVIF. One swap of the save node and your outputs become readable everywhere.

    If you've ever posted an image and gotten "workflow not included?" comments, or hunted through an SD Prompt Reader for a recipe that isn't there, this is the fix. The community's workflow-in-PNG culture is real and useful; this node just extends it past PNG and past ComfyUI's own ecosystem.

    How it works

    When your graph runs, ComfyUI hands the node hidden prompt and extra_pnginfo data. Save WEBP Meta digs through that to pull out what it can: seed, steps, CFG, sampler and scheduler from the KSampler; width/height from the latent; the checkpoint name; clip skip; RNG source; eta noise seed delta; emphasis mode; and the positive/negative prompt text. It assembles those into an A1111-style parameters string.

    Then it picks a storage strategy by format:

    • PNG → writes parameters, prompt, and workflow as PNG text chunks (the classic PngInfo path).
    • webp / webp_lossless / jpg / avif → writes everything into EXIF via piexif, with the parameters string in UserComment and ComfyUI's data in additional tags.

    The upshot: the same file is readable by ComfyUI (drag it back onto the canvas), by prompt viewers like SD Prompt Reader, Tiefsee, and Infinite Image Browsing, and - as a bonus - by Forge/NEO's prompt field. Don't expect a perfect import there: ComfyUI and A1111 use different samplers, schedulers, and graph structures, so the recovered prompt is "helpful starting point," not "bit-for-bit recreation."

    The inputs that matter

    Only four, and it's an output node, so nothing comes back out of it.

    • images - wire your VAE decode here.
    • file_format - webp (default), webp_lossless, png, jpg, or avif. For maximum reader compatibility the author recommends png, webp, or webp_lossless.
    • quality - 1–100, default 70. Straightforward: higher is heavier.
    • filename_prefix - default comfy_%model%_%date%, and this is where the node is sneakily powerful. It supports %seed%, %width%, %height%, %pprompt:N% / %nprompt:N% (truncated to N chars), %model:N%, %date%, %date:FORMAT%, and even %NodeTitle.WidgetName% to pull a widget value from another node. You can name files by their seed and model without thinking about it.

    Install

    Easiest route: ComfyUI Manager → search "Save WEBP Meta" → install, then restart. Or the old-fashioned way:

    cd /path/to/ComfyUI/custom_nodes
    git clone https://github.com/ukr8b3g-cmyk/ComfyUI-save-webp-meta-node save_webp_meta
    

    Restart ComfyUI and it shows up under image/save. Updates are just git pull inside that folder.

    The one real dependency is piexif (Pillow, numpy, and torch already ship with ComfyUI). Recent versions declare it in pyproject.toml, but if you get the piexif error, install it into the ComfyUI Python environment:

    python -m pip install piexif
    

    Verify format support while you're at it:

    python -c "from PIL import features; print('webp', features.check('webp')); print('avif', features.check('avif')); import piexif; print('piexif ok')"
    

    Where people get burned

    • Metadata vanishes after saving. The usual culprits aren't the node - it's image editors, optimizers, social media, and upload services stripping EXIF/text chunks. If metadata is missing, first retest with png, then check whether the reader even reads EXIF for that format.
    • Save Image (Websocket) doesn't preserve metadata. If your workflow saves via websocket (the in-browser preview path), swap in this node.
    • AVIF is the flaky one. It needs a Pillow build with AVIF support, and even then some external readers won't show the file or read its EXIF. When in doubt, png or webp_lossless.
    • Complex workflows parse poorly. External prompt readers may not fully interpret graphs full of custom nodes. That's the reader's limit, not really this node's.

    It's a small node with a narrow job, and it does it well. If you care about your outputs being self-documenting - and by now the community pretty much expects it - this is the save node worth swapping in.

    Categoryimage/save

    Inputs (4)

    NameTypeDefaultDescription
    imagesIMAGE
    filename_prefixSTRINGcomfy_%model%_%date%
    file_formatCOMBOwebp5 options: webp, webp_lossless, png, jpg, avif
    qualityINT701–100

    Outputs (0)

    No outputs