Nodes/ComfyUI Image Saver/Image Saver Metadata
ComfyUI Node Runs on cloud

Image Saver Metadata

Build the generation info once, save it anywhere

By alexopus·Created 3 years ago·Updated 23 days ago· 190
Image Saver Metadata
    • metadata
    • hashes
    • a1111_params
    modelname
    positiveunknown
    negativeunknown
    width512
    height512
    seed_value0
    steps20
    cfg7.00
    sampler_name
    scheduler_namenormal
    denoise1.00
    clip_skip0
    additional_hashes
    download_civitai_datatrue
    easy_remixtrue
    custom

    This is the brain to Image Saver Simple's hands. It takes all the details of your generation - prompt, model, sampler, steps, CFG, seed, size - and packages them into a single METADATA object you feed to a saver. On its own it saves nothing. What it does is turn a pile of loose values into the exact A1111-style parameter string Civitai reads for auto-detection, plus the resource hashes that make your uploads link back to the right checkpoint and LoRAs.

    Splitting metadata out from file-saving sounds fussy, but it pays off the moment your graph has more than one output branch: build the info once here, route the same METADATA to every Image Saver Simple downstream.

    How it works

    You wire in the same values your KSampler used - that's the discipline the whole pack is built around, since these nodes can't peek inside your sampler. The node then computes hashes for the model and any LoRAs (including ones you write into the prompt as <lora:name:weight>), formats the A1111 string, and emits it all as a METADATA bundle. A community contribution added the additional_hashes field, where you can paste AutoV3 hashes straight from Civitai for resources the node can't detect on its own - wildcards, ControlNets, anything off-graph - so those get cross-posted too.

    Because it computes the metadata but doesn't touch disk, you can also read its string outputs into a preview node to sanity-check what's about to be written.

    The inputs and outputs that matter

    Everything here is optional - you fill in what you know:

    • modelname - the checkpoint name/hash source. Feed it from a loader-with-name node so it matches reality.
    • positive / negative - your prompts.
    • seed_value / steps / cfg / sampler_name / scheduler_name / denoise - the sampler settings; drive these from the same nodes as your KSampler.
    • additional_hashes - paste Civitai AutoV3 hashes for undetectable resources.
    • clip_skip - record it if your model family uses it (SD 1.5 anime lineage mostly; on SDXL and newer LLM-encoder models it's usually inert).

    The main output is metadata (a METADATA object) - send it to Image Saver Simple. It also emits hashes and a1111_params strings for inspection.

    Installing it

    ComfyUI Manager: search ComfyUI Image Saver, install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/alexopus/ComfyUI-Image-Saver
    cd ComfyUI-Image-Saver
    pip install -r requirements.txt
    

    Restart, hard-refresh. Small dependency install, no models.

    Where people get tripped up

    The metadata is only as accurate as what you feed it. Type the model name by hand and get a character wrong, and the hash won't match any Civitai version, so nothing links. The fix is to source modelname from Checkpoint Loader with Name (or UNet loader with Name) so the exact filename flows through untouched.

    Watch clip_skip: pass it a string instead of a number and the downstream save can throw bad operand type for abs(): 'str'. Keep it a plain integer. And don't expect resources you never loaded to appear - if a LoRA runs through a node the saver can't inspect, it won't be hashed automatically; that's what additional_hashes is for. Finally, remember this node is inert by itself: no saver downstream means no file and no metadata written.

    CategoryImageSaver

    Inputs (16)

    NameTypeDefaultDescription
    modelnameoptSTRINGmodel name (can be multiple, separated by commas)
    positiveoptSTRINGunknownpositive prompt
    negativeoptSTRINGunknownnegative prompt
    widthoptINT5120–16384image width
    heightoptINT5120–16384image height
    seed_valueoptINT00–18446744073709550000seed
    stepsoptINT201–10000number of steps
    cfgoptFLOAT7.000–100CFG value
    sampler_nameoptSTRINGsampler name (as string)
    scheduler_nameoptSTRINGnormalscheduler name (as string)
    denoiseoptFLOAT1.000–1denoise value
    clip_skipoptINT0-24–24skip last CLIP layers (positive or negative value, 0 for no skip)
    additional_hashesoptSTRINGhashes separated by commas, optionally with names. 'Name:HASH' (e.g., 'MyLoRA:FF735FF83F98') With download_civitai_data set to true, weights can be added as well. (e.g., 'HASH:Weight', 'Name:HASH:Weight')
    download_civitai_dataoptBOOLEANtrueDownload and cache data from civitai.com to save correct metadata. Allows LoRA weights to be saved to the metadata.
    easy_remixoptBOOLEANtrueStrip LoRAs and simplify 'embedding:path' from the prompt to make the Remix option on civitai.com more seamless.
    customoptSTRINGcustom string to add to the metadata, inserted into the a111 string between clip skip and model hash

    Outputs (3)

    NameTypeDescription
    metadataMETADATAmetadata for Image Saver Simple
    hashesSTRINGComma-separated list of the hashes to chain with other Image Saver additional_hashes
    a1111_paramsSTRINGWritten parameters to the image metadata