Nodes/ComfyUI-HWP-Nodes/HWP Save Image (Advanced)
ComfyUI Node

HWP Save Image (Advanced)

One save node, six formats, and a filename that's actually the filename

By hwprinz·Created 27 days ago·Updated 2 days ago· 1
HWP Save Image (Advanced)
  • images
    custom_path
    filename_prefixcomfyui
    timestamp
    format
    quality100
    ico_sizesMedium (64, 128, 256)
    meta_datafalse
    blind_watermark
    previewtrue

    ComfyUI core gives you one save node, and it writes PNG. That's the whole menu. So everyone runs the same loop: generate the PNG, dig it out of output/, open it somewhere, export a JPEG for the friend who asked and a WebP for the website.

    HWP Save Image (Advanced) puts that export step back inside the graph: pick a format, hit run, get the file you asked for, in the folder you asked for.

    What it is, and the one thing it does differently

    It's the terminal node from hwprinz's small ComfyUI-HWP-Nodes pack (the rest is seed/noise and latent-size utilities). The author modeled it on LayerStyle's SaveImage Plus (Advanced), then added TIFF, WebP and multi-resolution ICO.

    The difference that matters versus core SaveImage: it writes exactly the file the widget says. No _00001_ counter bolted onto your prefix unless you asked for a timestamp. It also logs a -> Saved image to <full path> line per file, which sounds trivial until a 200-image batch lands somewhere you can't identify in a terminal. It's a leaf node: nothing wires out of it, and output nodes always run.

    The inputs you'll actually touch

    images is the batch, one file per image. That's the entire data path in.

    custom_path is where it lands: empty means the normal output/ folder, anything else gets created if it doesn't exist. Both it and filename_prefix (default comfyui) accept %date and %time tokens, so runs/%date/%time works.

    timestamp is the uniqueness dial - None, second, or millisecond, the latter two appending a _YYYY-MM-DD_HH-MM-SS(-mmm) suffix. On None, an unpinned prefix plus a multi-image batch collides.

    format and quality are the point of the node.

    Formats, and what each one costs you

    • png - lossless, alpha kept. Watch quality: it maps to compression level as (100 − q) // 10, so quality: 100 means zero compression and the biggest files you can make. Drop it to 70–80 unless you're archiving.
    • jpg - 4:4:4, so no chroma smearing on fine text. RGBA gets composited over white, which is correct and also why your transparency vanishes.
    • webp / webp (lossless) - lossy is the sane "I'm out of disk" pick. Lossless hides the quality widget because it ignores it.
    • tiff - LZW, lossless, alpha kept. For handing off to a real editing pipeline, not the web.
    • ico - multi-resolution, with ico_sizes presets (Small (32, 48, 64), Medium (64, 128, 256), Large (128, 256, 512)). Every size is resampled from the full-resolution source, not a pre-shrunk frame - plenty of icon writers upscale from the smallest entry and you can see the softness. If you're generating favicons out of ComfyUI, this is your node.

    meta_data, blind_watermark, preview

    meta_data is the one to understand. On PNG it writes the prompt plus each extra_pnginfo key as text chunks - the standard convention, and why a saved PNG drags back onto the canvas and rebuilds the graph. On JPG/WEBP/TIFF it can only put a JSON blob in the EXIF UserComment tag, and no EXIF tag reconstructs a node graph. Switch format away from PNG and you've traded your workflow file for a picture. It also honours the core --disable-metadata flag, so if files come out bare, check your launch args first. It does not write an A1111-style parameters chunk - the thing CivitAI parses for model auto-linking - so it isn't the fix for that.

    blind_watermark hides a short string in the image: a QR-style payload spread across the full RGB frame, invisible, preserved by lossless PNG output. Extracting it later needs the blind_watermark PyPI package and password_img=1, password_wm=1. It's a provenance tool, not a credit tool, and it only survives if nobody re-encodes. Images too small to carry the payload save without it and log a warning.

    preview shows the result in the UI. Saving to a custom_path with preview on means the real files go to your folder and a PNG preview goes to temp instead - the image in the tab is not the file on disk.

    Install

    Manager, search ComfyUI-HWP-Nodes (everything registers under the HWP category, so HWP in the node search finds it). Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/hwprinz/ComfyUI-HWP-Nodes
    

    Restart ComfyUI. No model downloads, no heavy dependencies - it's Pillow underneath, which ComfyUI already ships.

    Where people get burned

    Formats that drop the metadata. Save a batch as JPEG because it's smaller, then try to drag one back in to recover the seed. Won't work - no graph chunk in JPEG. Keep PNG as the master, treat the rest as derivatives.

    ICO plus meta_data. ICO can't carry metadata. You get a log warning and a file with nothing embedded. Not a bug.

    Trust. One author, no community discussion behind it, installed the normal way: cloned and imported with full Python access, no audit. image_save.py is short. Read it.

    CategoryHWP

    Inputs (10)

    NameTypeDefaultDescription
    imagesIMAGE
    custom_pathSTRING
    filename_prefixSTRINGcomfyui
    timestampCOMBO3 options: None, second, millisecond
    formatCOMBO6 options: png, jpg, webp, webp (lossless), tiff, ico
    qualityINT10010–100
    ico_sizesCOMBOMedium (64, 128, 256)3 options: Small (32, 48, 64), Medium (64, 128, 256), Large (128, 256, 512)
    meta_dataBOOLEANfalse
    blind_watermarkSTRING
    previewBOOLEANtrue

    Outputs (0)

    No outputs