Nodes/ComfyUI-Image-Process/Save Image (AVIF)
ComfyUI Node

Save Image (AVIF)

The modern-codec saver for people who are done with bloated PNGs

By wakaura-asaho·Created 5 months ago·Updated 2 months ago· 1
Save Image (AVIF)
  • images
    filename_prefixComfyUI

    Save Image (AVIF) is the pack's on-ramp to the most modern format it supports. AVIF is the AV1-based image codec that gets you JPG-like file sizes at noticeably better quality - real-world 1024×1024 renders routinely come out a fraction of the PNG size with visually comparable quality. Web support is solid now (every major browser since ~2021), and if your deliverables live on a website, an app, or anywhere bandwidth is a currency, AVIF is a quietly great choice.

    The honest tradeoff: AVIF encoding is slow. It's not the "wait a second" kind of slow, it's the "wait while the graph finishes" kind - the codec spends serious CPU time on compression. And compatibility outside browsers is patchier than JPG: plenty of image editors and social sites still handle it poorly, so it's a format you pick deliberately, not by default.

    What the simple node does

    Frames are converted to RGB (no alpha on this variant), written with fixed quality 85 and speed 6, one numbered .avif per frame in ComfyUI/output. Quality 85 in AVIF territory is genuinely good - because the codec is so efficient, you get more headroom than the same number on a JPG scale would suggest.

    The inputs are the usual minimal pair:

    • Images (IMAGE) - the batch.
    • Filename Prefix - pack token support (%date:yyyy-MM-dd%, %hour%, %minute%, %width%, %height%).

    No outputs - terminal save node.

    Who should pick this over JPG

    If you're exporting images that live on the web and the destination accepts AVIF, the size savings are real enough to matter at scale. If you're handing files to a client, a printer, or a stock site, check what they accept first - JPG remains the safe universal choice, and the pack's advanced JPG node handles that fine. If you need alpha with AVIF, that's the advanced variant's job (AVIF supports transparency, and this one's sibling does it).

    The AVIF caveat you should know

    Pillow only writes AVIF if it was built with libavif support, which lands in recent Pillow - this pack pins Pillow ≥ 12.1, so a fresh install is covered. But if you upgraded Pillow in place and AVIF saves fail with an "encoder not available" style error, that's the build, not the node. It's also the reason this pack's README tells you to install with --upgrade-strategy only-if-needed: pip resolving your existing Pillow down is exactly how you'd end up with a version that can't write AVIF at all.

    Install

    Part of ComfyUI-Image-Process:

    cd ComfyUI/custom_nodes
    git clone https://github.com/wakaura-asaho/comfyui-image-process
    pip install -r comfyui-image-process/requirements.txt
    

    then restart, or find the pack in ComfyUI Manager. Deps are numpy, Pillow 12.1+, scipy, opencv, scikit-image - no models. Modern ComfyUI required (frontend ≥ 1.37, base ≥ 0.12).

    CategoryWakaura

    Inputs (2)

    NameTypeDefaultDescription
    imagesIMAGEThe images to be saved.
    filename_prefixSTRINGComfyUIThe prefix for the file to save. This may include formatting information such as %date:yyyy-MM-dd% or %Empty Latent Image.width% to include values from nodes.

    Outputs (0)

    No outputs