Smart Save Animated Image
Animated PNG that your browser can't play — read this first
- images
Smart Save Animated Image (the node's display name) saves a batch of frames as an animation - and the first thing you need to know is that its default "APNG" output is not the APNG your browser plays. It's a custom binary container the pack's own documentation calls "a simple binary format that requires custom code to read." That's not a bug, but it will absolutely burn you if you expect a double-clickable animation.
The format situation, plainly
Three choices on the format dropdown:
- GIF - a real, standard animated GIF. This is the one that just works everywhere. The source does real work here: it builds a global 256-color palette across all frames and uses a key-color trick to fake transparency (it picks a random RGB value absent from the image, paints transparent areas with it, and marks that index transparent). Good quality for an 8-bit format, and it actually plays.
- APNG - the
.apngfile is a custom container: an 8-byte header (frame count, then FPS × 100 as little-endian ints) followed by each frame stored as a raw PNG with a 4-byte length prefix. There is no PNG signature, no standard APNG chunks. The pack shipsdoc/APNG_Format.mddescribing how to read it, but nothing in the pack reads it back - you'd need your own parser (or feed it to whatever custom tooling the author built around it). - PNGif - extension
.pngif, written through the same custom container as APNG. Same caveat.
So: if you want to share or view the result, pick GIF. The APNG/PNGif modes are lossless-per-frame (each frame is a full PNG, so no inter-frame quality loss and no 256-color limit) but locked behind the custom format.
Inputs that matter
images- your frame batch (an IMAGE tensor, e.g. from a video loader or a batch of renders).fps- playback speed; default 12, up to 1000.filename_prefix- output name. The node also honors an absolute path here, including cross-drive paths, which is a genuinely useful touch - it'll save to any directory you point at rather than only ComfyUI's output folder.lossless- for the PNG-based modes this toggles PNG compression level (1 vs 4), not actual quality loss. Don't expect "lossy" output here.save_metadata- embeds your prompt and extra PNG info into each frame's PNG metadata (only meaningful in the PNG-ish modes).
Installing it
Pack-wide install:
cd ComfyUI/custom_nodes/
git clone https://github.com/slvslvslv/ComfyUI-SmartImageTools
pip install -r ComfyUI-SmartImageTools/requirements.txt
Restart, or ComfyUI Manager → "ComfyUI-SmartImageTools". Real requirements: scikit-learn, scikit-image, numpy, Pillow, opencv-python, numba - the README understates it.
Gotchas
- The trap is the name. "APNG" here ≠ standard APNG. If a workflow's output mysteriously won't open in a viewer, it's because it's the custom container.
- If you need transparency in the GIF output, it's the key-color hack - works, but colors near the randomly chosen key color can theoretically collide (the code tries to avoid it; in practice it's fine).
- Everything is a single output file, not a numbered sequence - you get
prefix.gif(or.apng), and the node overwrites by counter per ComfyUI conventions. - Batch input is required - one image with
format: GIFwill still save, but an animation needs ≥2 frames to be worth anything.
For real animated output that other people can watch, this node's GIF mode is solid. For the PNG modes, read doc/APNG_Format.md before you commit a workflow to them - they're designed for a specific custom pipeline, not for general consumption.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| fps | FLOAT | 12.00.1–1000 | — |
| filename_prefix | STRING | ComfyUI | — |
| lossless | BOOLEAN | true | — |
| save_metadata | BOOLEAN | true | — |
| format | COMBO | APNG | 3 options: APNG, PNGif, GIF |
Outputs (0)
No outputs