Save Animated PNG
Lossless animation, at a price
- images
- images
Animated PNG is the format people forget exists until they need it, and then it's the only thing that will do. Save Animated PNG turns a stack of frames into a single .png animation with zero quality loss and full alpha support. It's the fidelity-first option in the animation save pair - the one you pick when the file has to be perfect and you're willing to pay in megabytes.
What it is
Three inputs, one output. images is your frame stack, filename_prefix defaults to ComfyUI, and fps (default 6, range 0.01–1000) sets the playback rate. Then there's compress_level - 0 to 9, default 4, and it's exactly what it sounds like: how hard the PNG compressor works on each frame. Higher compresses smaller but takes longer to encode; 4 is the sensible default, and cranking it to 9 buys a little size at the cost of noticeably slower saves on long animations. The images output passes the frames through, so you can keep feeding the same branch after saving.
That's the whole mechanism: APNG is literally a sequence of PNG frames packed into one file with timing metadata. Because each frame is a real PNG, there's no color quantization, no generation loss, and alpha transparency survives - which is why it's the format of choice when your animation has transparent backgrounds or needs to be pixel-perfect.
Animated PNG vs. animated WebP
This is the decision you'll actually face, because ComfyUI ships both. The short version:
- APNG (this node): lossless, full alpha, universally understood by browsers and editors - but file sizes are brutal. Each frame is a full PNG, so a 60-frame 512×512 loop can land in the tens of megabytes.
- WebP (Save Animated WEBP): far smaller, full color, alpha capable, and lossless mode exists - but some older viewers still stumble on it, and its alpha and lossless handling are slightly more modern in practice.
Reach for APNG when the destination is an editor, a pixel-art workflow, or anywhere fidelity and transparency beat file size. Reach for WebP when the destination is the internet - Discord, a website, a chat - because a 40 MB APNG is a good way to make people not open your file. Both are core, so the choice is yours with zero installs either way.
Getting it and where it goes wrong
Ships with ComfyUI core, part of the newer node system in comfy_extras/nodes_images.py - no install, no model files. The gotchas:
- File size sneaks up on you. Short loops are fine; anything long gets heavy fast. If your APNG comes out at 80 MB, that's not a bug - that's the format. Switch to WebP or an actual video if size matters.
fpsis the only timing control. Same as the WebP node - a 30-frame stack at default 6 fps is a five-second loop. Set it before you queue.- It's an output node with a pass-through. If you only wire it as a save and forget the
imagesoutput, downstream nodes have nothing to grab - though for a pure save node that's usually fine.
If you've got a transparent-background animation that has to stay lossless, this is the built-in that does it - just budget the disk space.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| filename_prefix | STRING | ComfyUI | — |
| fps | FLOAT | 6.000.01–1000 | — |
| compress_level | INT | 40–9 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |