Save Image as WEBP
The Stock Save Image Node, Smaller Files
- images
Same job as ComfyUI's built-in Save Image node, minus the reasons you'd normally reach for a third-party save node instead: it writes WebP instead of PNG. For photographic renders that routinely means a fraction of the file size at a quality difference you won't notice, which matters the moment you're batching hundreds of outputs or shipping images somewhere bandwidth-constrained.
What it actually preserves. This isn't a stripped-down save node - under the hood it reimplements ComfyUI's own save-image path and retargets it at WebP, so the things you'd expect to lose don't disappear. It embeds the same workflow and prompt metadata into the file (via WebP's EXIF tags rather than PNG's tEXt chunks), so dragging a saved WebP back onto the ComfyUI canvas still reloads the exact workflow that produced it - a convenience that has nothing to do with file format and everything to do with this node deliberately keeping it. It also keeps the standard %batch_num% counter for numbering multiple images from one batch, and sanitizes illegal filename characters into underscores the same way stock save nodes do.
Inputs that matter. images (required IMAGE) is the obvious one. output_type is an enum - output or temp, default output - and it's doing the job of two separate stock nodes at once: output behaves like Save Image (written to the output/ folder, shows up in the gallery), temp behaves like Preview Image (written to temp/, doesn't persist). One dropdown instead of two nodes to choose between. filename_prefix (STRING, default "ComfyUI") is where you'd plug in something built from the rest of yanc's string nodes - Get Widget Value String, Format Datetime String, Concatenate Strings, Truncate String - if you want filenames that actually mean something instead of a counter. lossless (BOOLEAN, default false) toggles lossless WebP encoding. quality (INT, default 90, range 0–100) is the lossy-mode quality slider - it's ignored entirely when lossless is on, so don't bother tuning it in that mode.
Outputs. None - like Save Image, this is a terminal node. Nothing downstream to wire.
Installing it. ComfyUI Manager: search "comfyui-yanc," install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ka-puna/comfyui-yanc
then restart ComfyUI. No extra dependencies to install - WebP encoding rides on Pillow, which ComfyUI already ships with for its own image nodes - and no models. This one's genuinely a drop-in swap, not a heavier install than what you already have.
Troubleshooting. If your files aren't shrinking the way you expected, check lossless first - it's off by default, but if something got flipped on, lossless WebP compresses less aggressively than lossy mode, and you lose the whole point of switching formats. In lossy mode, quality in the 80–90 range is a reasonable default for most photographic output; push it much lower and you'll start seeing visible blocking on smooth gradients and skin tones, the same as any lossy image codec. And if some downstream tool - an older image viewer, an upload pipeline, a print service - chokes on WebP entirely, that's a compatibility gap on the receiving end rather than a bug in this node; WebP is broadly supported at this point but "broadly" isn't "universally," so it's worth a quick check before you commit an entire pipeline to it.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| output_type | COMBO | output | 2 options: output, temp |
| filename_prefix | STRING | ComfyUI | — |
| lossless | BOOLEAN | false | — |
| quality | INT | 900–100 | — |
Outputs (0)
No outputs