AVIF Animation (avifenc)
Tiny transparent clips from your frame batch, no ffmpeg required
- images
- avif_path
Every video workflow in ComfyUI ends the same way: you've got a batch of frames and no clean way out. AnimateDiff, LTX-Video, Wan - they all dump IMAGE tensors, and the standard exits are ugly. MP4 loses your alpha channel and drags in a ffmpeg dependency you have to babysit. GIF is 256 colors and 10x the file size it deserves. That's the gap this node fills: one "AVIF Animation (avifenc)" node turns your frame batch into a single .avif animation with real transparency, small enough to throw into Discord, a web page, or a preview without apologizing.
AVIF is the animated image format the ecosystem keeps sleeping on. Better compression than JPEG, PNG, and WebP, full alpha support, hardware-accelerated decode on modern phones and laptops, and every browser except the usual holdout renders it. This node is just a clean wrapper around avifenc, the official libavif CLI, so you get the real encoder rather than a hobby reimplementation.
How it works
The mechanism is gloriously simple, and there's no magic to distrust. The node takes your IMAGE batch, saves every frame as a temp PNG, then shells out to avifenc with four flags and hands it the list of frames. avifenc stacks them into one animated .avif and writes it straight into ComfyUI's output directory with a timestamped filename like avif_animation_20260823102030.avif. You get the file path back as a STRING, and it also pushes the result into the UI as a preview image.
No Python dependencies of its own, by the way - the pack's requirements.txt is empty. It uses torch, Pillow, and numpy, all of which ComfyUI already ships. The only real external requirement is the avifenc binary itself, which the pack tries to download and install automatically on first import.
The inputs that matter
- images (IMAGE) - your frame batch. Wire in whatever sequence you generated. Note it sniffs each frame's channel count: if any frame is 4-channel (RGBA) the encode keeps transparency; pure RGB frames get an opaque alpha added automatically.
- quality - 0–100, default 50. Main encoder quality. Crank it for masters, drop to ~35–45 for things going on a webpage.
- alpha_quality - 0–100, default 60. The transparency channel gets its own quality knob, which is rare and genuinely useful for logo animations.
- speed - 0–10, default 6. Encoding speed, not playback speed; lower is slower but better-compressed.
- fps - 1–120, default 24. This is stored as container metadata for playback speed.
That's the whole surface. Nothing to get lost in.
Installing it
ComfyUI Manager is the easy path: search "ComfyUI-AVIF-Animation" and install. Or do it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/foge1024/ComfyUI-AVIF-Animation
Then restart ComfyUI. The real step that trips people up is avifenc. On import the pack auto-runs its installer, which downloads the v1.3.0 *-artifacts.zip from the libavif GitHub releases and copies the binary into your Python environment's Scripts/bin folder. If that download fails - GitHub release asset names have a way of shifting - you'll see the "avifenc not found" error and should grab the zip from the libavif releases page and put avifenc on your PATH manually.
Where people get burned
The auto-download is the first failure point, handled above. The second is expecting this to be fast for long sequences: it's a per-frame PNG export plus a single-threaded encoder run, so a 200-frame batch at 1024×1024 takes a while. That's the nature of shelling out, not a bug. Third, keep in mind the file lands in ComfyUI's output folder with a timestamp name - there's no dedupe and no custom output path yet, so a long session accumulates files. It's a small utility node and it knows it; for anything fancier you'd be wiring Save Image nodes or an ffmpeg pack instead.
Want to loop it? Set fps to whatever the animation should play at and let the player loop - the format does that natively. That's it. For a niche gap - "I need a transparent, web-ready animation out of my frame batch" - this is about the leanest tool that actually works.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| fps | INT | 241–120 | — |
| quality | INT | 500–100 | — |
| alpha_quality | INT | 600–100 | — |
| speed | INT | 60–10 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| avif_path | STRING | — |