Nodes/TW-CUI-Util/Save Image (Advanced)
ComfyUI Node

Save Image (Advanced)

Save Image (Advanced)

By TW-CUI·Created 2 years ago·Updated 2 years ago· 1
Save Image (Advanced)
  • images
    filename_prefix%time_%seed
    path
    extensionpng
    steps
    cfg
    sampler_name
    scheduler
    positive_promptunknown
    negative_promptunknown
    seed-1
    width0
    height0
    lossless_webptrue
    quality_jpeg_or_webp100
    time_format%Y-%m-%d-%H%M%SUTC
    save_metadatatrue
    save_workflow_with_metadatafalse
    save_extra_pnginfo_with_metadatafalse
    model_nameunknown
    model_hashunknown
    vae_nameunknown
    vae_hashunknown
    lora_in_usefalse
    lora_nameunknown
    lora_hashunknown
    compression5

    One of ComfyUI's biggest usability regressions compared to old-school A1111 is metadata. A1111 baked your prompt, sampler, steps, CFG, and model hash into every PNG as a human-readable text block - open the image in a text editor, or paste it into CivitAI, and every setting is right there. ComfyUI's stock Save Image instead embeds the entire node graph as JSON. That's more powerful in one sense - drag the PNG back into ComfyUI and the whole workflow reconstructs - but it's not what most metadata-reading tools, hash-checkers, or a human skimming a folder actually want to parse. Save Image (Advanced) is TW-CUI-Util's answer: a save node built specifically to take per-field generation data as separate inputs and write it out in something closer to the old, readable shape.

    How it works. Instead of scraping your workflow graph for values, this node asks you to feed it the pieces directly - steps, cfg, sampler_name, and scheduler as required inputs, plus, optionally, your positive/negative prompt strings, seed, width/height, and - the part that makes it interesting - model_name, model_hash, vae_name, vae_hash, lora_name, lora_hash, and a lora_in_use flag. If you're using this pack's own Checkpoint / VAE / LoRA Loader upstream, it already emits all six of those name/hash strings alongside the actual MODEL/CLIP/VAE objects, so the two nodes are clearly meant to click together: load once, save with full provenance, without retyping anything by hand.

    Inputs and outputs that matter. images is your usual IMAGE input from VAE Decode. filename_prefix defaults to %time_%seed - it supports templating tokens, so files auto-name themselves by generation time and seed instead of all landing as ComfyUI_00001_.png. extension picks png/jpeg/webp; for jpeg and webp you get quality_jpeg_or_webp (1-100), and webp specifically also gets a lossless_webp toggle. path routes output into a subfolder. The three booleans - save_metadata, save_workflow_with_metadata, and save_extra_pnginfo_with_metadata - are independent levers: you can bake in your per-field generation data without also carrying the full graph JSON, or do both. There are no outputs to wire further - it's a terminal node, it just writes the file.

    Installing it. Comes bundled with TW-CUI-Util. ComfyUI Manager: search "TW-CUI-Util", install, restart. Or manually, git clone https://github.com/TW-CUI/TW-CUI-Util into ComfyUI/custom_nodes and restart. No models, no heavyweight dependencies to fight with - the whole pack is self-contained utility nodes.

    Troubleshooting.

    • If your saved PNGs don't have the metadata you expected, double-check that save_metadata (or the workflow/pnginfo booleans) are actually toggled the way you think - it's easy to leave one off and not notice until you're digging through a batch later.
    • JPEG and WebP are lossy at anything under quality 100. If you're archiving "final" outputs rather than quick previews, PNG is still the safer default; drop to JPEG/WebP mainly to save disk space on batches you don't need pixel-perfect.
    • If the optional model/vae/lora fields all read "unknown" in your saved metadata, that's the node's own default text showing through - nothing's actually wired into those inputs upstream. Connect this pack's loader node (or feed the strings manually) if you want real values there instead of placeholders.
    • Grey or washed-out saved images usually trace back to a VAE mismatch further upstream, not this node - if a checkpoint's own page doesn't recommend an external VAE, leaving the loader on the checkpoint's baked-in choice is the safer default.
    • If the node disappears from your search after a ComfyUI or pack update, that's an import-failure symptom rather than something wrong with this specific node - check the ComfyUI startup console for a TW-CUI-Util error before assuming your workflow itself is broken.
    CategoryTW-CUI/image

    Inputs (27)

    NameTypeDefaultDescription
    imagesIMAGE
    filename_prefixSTRING%time_%seed
    pathSTRING
    extensionCOMBOpng3 options: png, jpeg, webp
    stepsINT
    cfgFLOAT
    sampler_nameSTRING
    schedulerSTRING
    positive_promptoptSTRINGunknown
    negative_promptoptSTRINGunknown
    seedoptINT-1-1–18446744073709550000
    widthoptINT00–16384
    heightoptINT00–16384
    lossless_webpoptBOOLEANtrue
    quality_jpeg_or_webpoptINT1001–100
    time_formatoptSTRING%Y-%m-%d-%H%M%SUTC
    save_metadataoptBOOLEANtrue
    save_workflow_with_metadataoptBOOLEANfalse
    save_extra_pnginfo_with_metadataoptBOOLEANfalse
    model_nameoptSTRINGunknown
    model_hashoptSTRINGunknown
    vae_nameoptSTRINGunknown
    vae_hashoptSTRINGunknown
    lora_in_useoptBOOLEANfalse
    lora_nameoptSTRINGunknown
    lora_hashoptSTRINGunknown
    compressionoptINT51–9

    Outputs (0)

    No outputs