Nodes/Comfy-UmiAI/Umi Save Image (with metadata)
ComfyUI Node

Umi Save Image (with metadata)

Your PNG Should Remember Which Roll Made It

By Tinuva88·Created 10 months ago·Updated 12 days ago· 28
Umi Save Image (with metadata)
  • images
    ◄filename_prefixUmi►
    ◄positive_prompt—►
    ◄negative_prompt—►
    ◄input_prompt—►
    ◄input_negative—►

    Here's a problem that only shows up once you start using wildcards seriously. You queue sixty variations, get one you love, and the PNG's embedded metadata tells you the prompt was __hair__ girl in a __location__, {red|blue} jacket - the template, not the roll. Nothing in the file tells you which hair color actually came out. Umi Save Image exists to close that gap: it writes the resolved prompt into the PNG alongside the original template, so the picture is still searchable and reproducible after the fact.

    What it does

    It's a save node in the ordinary ComfyUI sense - an output node that writes PNGs into ComfyUI/output/ - with one difference: it takes the prompt as wiring rather than reading it out of the graph. Two required inputs, images (the batch to save) and filename_prefix (default Umi, and it accepts a subfolder, e.g. portraits/Umi; a counter is appended automatically, and %batch_num% addresses the batch index).

    Then four optional inputs, all of which are connection-only sockets - you cannot type into them:

    • positive_prompt ← the Wildcard Processor's text output (the resolved prompt)
    • negative_prompt ← negative_text
    • input_prompt ← input_text (the original template, before expansion)
    • input_negative ← input_negative

    Wire all four and each PNG carries umi_prompt, umi_negative, umi_input_prompt and umi_input_negative as text chunks, on top of the usual ComfyUI workflow and prompt chunks. That's what the pack's Image Browser panel scans when it searches output images - it reads exactly those umi_ keys, falling back to the stock prompt chunk.

    Why the template matters

    Most people only wire the first two. Don't skip input_text. The resolved prompt tells you what generated this image; the template tells you what to change to get a different one. Without it you're reverse-engineering your own prompt language from one lucky sentence - which, if you've ever tried to reuse a wildcard batch a month later, you know is a miserable afternoon.

    Install

    It's part of the pack core, so there's no separate install:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Tinuva88/Comfy-UmiAI
    cd Comfy-UmiAI && pip install -r requirements.txt
    

    Restart ComfyUI afterwards. Only pyyaml is needed for core; the image browser that reads this metadata back is in the optional UI-tools overlay, which also wants requests and curl_cffi.

    Where people get burned

    Nothing connected, nothing written. Because those four sockets are connection-only, an unwired node silently produces a normal PNG with no Umi metadata, and the browser then shows nothing for it - which reads as "the metadata feature is broken." The node prints a warning to the console in that case, so check the console before filing a bug. The same happens if ComfyUI was launched with --disable-metadata: the node says so and saves the image anyway.

    This is not the CivitAI node. Umi Save Image writes ComfyUI-style graph chunks plus the four umi_ fields. It does not write the flat A1111-style parameters block, which is what CivitAI's uploader parses to auto-link your checkpoint and LoRAs. If auto-linking on upload matters to you, that's a different save node's job - this one is for your own workflow and your own browser.

    PNG only. The metadata lives in PNG text chunks. Convert the file to JPEG or WebP, or let a host re-encode it, and it's gone - same rule as any ComfyUI output. Keep the PNG, publish the small version.

    One last thing: an empty image batch doesn't error. It logs that it received nothing and saves nothing, so if a save node appears to do nothing at all, look upstream at whatever produced zero images.

    CategoryUmiAI

    Inputs (6)

    NameTypeDefaultDescription
    imagesIMAGE—
    filename_prefixSTRINGUmiPNG name and optional subfolder, relative to ComfyUI's output folder. Example: portraits/Umi. A counter is added automatically; %batch_num% selects the batch index.
    positive_promptoptSTRINGConnect the Wildcard Processor's text output to embed the resolved prompt as searchable PNG metadata.
    negative_promptoptSTRINGConnect negative_text to embed the resolved negative prompt.
    input_promptoptSTRINGOptional original template, before wildcard expansion. Connect input_text to preserve it alongside the resolved prompt.
    input_negativeoptSTRINGOptional original negative template. Metadata is omitted when ComfyUI starts with --disable-metadata.

    Outputs (0)

    No outputs