ComfyUI Node
Save as Animated WebP
Saves a VIDEO or an image batch as an animated WebP, lossless or lossy, with the same frame-dropping, scaling and tone controls as Save as GIF. The frames as written come back out as an IMAGE batch so the result can be inspected without opening the file.
Save as Animated WebP
- video
- images
- images
- info
◄filename_prefixComfyUI►
◄source_fps12.0►
◄fps12.0►
◄width0►
◄height0►
◄size_modepad►
◄resamplelanczos►
◄losslesstrue►
◄quality80►
◄method4►
◄loop_count0►
◄gamma1.00►
Categoryload-gif-as-video
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| filename_prefix | STRING | ComfyUI | Prefix for the file written into the ComfyUI output directory. |
| source_fps | FLOAT | 12.00.1–240 | The rate an `images` batch is meant to play at. Ignored when `video` is connected — a VIDEO carries its own rate. This is only the description of the input; `fps` is what gets written. |
| fps | FLOAT | 12.00.1–60 | Frame rate of the WebP. Set it below the source rate to drop frames: the animation runs for the same length of time on fewer frames, which is the cheapest way to shrink the file. Raising it above the source rate does nothing. |
| width | INT | 00–8192 | Output width in pixels. 0 keeps the source width, or derives it from `height`. With both set, the frame is scaled to fit inside the box keeping its aspect ratio; `size_mode` decides what happens to the room left over. |
| height | INT | 00–8192 | Output height in pixels. 0 keeps the source height, or derives it from `width`. |
| size_mode | COMBO | pad | What `width` x `height` means when the source has a different aspect ratio. pad: the box is the canvas — the frame is centred and the leftover bars are written transparent, so the WebP is exactly the requested size. fit: the frame is scaled to the largest size that fits inside the box and written at that size, with no bars. Same thing whenever only one of width/height is set. |
| resample | COMBO | lanczos | Filter used when scaling. lanczos is the sharpest downscale; box and hamming are softer and compress a little better; nearest keeps pixel art and hard-edged animation crisp instead of blurring it. |
| lossless | BOOLEAN | true | Lossless WebP stores every pixel exactly, so the file decodes back to the `images` output bit for bit; `quality` then only trades encode time for file size. Off writes lossy WebP (VP8), where `quality` is the usual quality/size trade and is much smaller on photographic material. |
| quality | INT | 800–100 | Lossy: picture quality, 0 (smallest, ugliest) to 100 (largest, nearly lossless). Lossless: compression effort, 0 (fastest) to 100 (smallest) — the pixels are exact either way. |
| method | INT | 40–6 | How hard libwebp tries, 0 (fastest) to 6 (slowest, smallest). Never changes the picture at a given quality, only the time and the size; 6 can take several times as long as 4 for a few percent off the file. |
| loop_count | INT | 00–1000 | How many times the animation plays. 0 loops forever. |
| gamma | FLOAT | 1.000.1–10 | Tone correction applied to the frames before they are encoded. 1.0 leaves them alone; above it brightens the midtones, below it darkens them, and black and white stay put. The `images` output shows the corrected result. |
| videoopt | VIDEO | The video to save. Its frame rate is used as-is. | |
| imagesopt | IMAGE | Frames to save, timed by the `source_fps` widget. Connect this or `video`, not both. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| info | STRING | — |