πΎ TA Save Image Optional
Save to JPEG or WebP, or don't save at all
- images
- IMAGE
ComfyUI's SaveImage only writes PNG, and it always writes. TA Save Image Optional gives you two things the stock node won't: a real format choice - JPEG or WebP - and an enable switch so the same node can be "on" in production and "off" while you iterate. It's the save node for people who hate cleaning up folders full of 40MB PNGs.
Inputs are images and a filename_prefix (with the same %date:...% and node-value formatting the stock node supports), plus enabled (default on) and the two prompt strings, positive_prompt and negative_prompt. The save_txt toggle controls whether a companion .txt file gets written next to each image with the prompts and a timestamp - the same sidecar feature as the pack's TA Save Image With Prompt. Then the parts the stock node lacks: save_format, a choice of jpg or webp, and jpeg_quality, one of 70/80/90/95/100 (default 95). It passes IMAGE through its output, so it slots into a graph without breaking a chain.
The workflow rationale is simple. PNG is lossless and enormous; if your outputs are headed for social media, a blog, or a dataset that doesn't need pixel-perfect losslessness, JPEG at 95 looks the same to a human eye at a fraction of the size, and WebP does even better. If you've ever shared a workflow and watched someone's output folder fill up at a gigabyte a minute, you understand why a quality knob matters. The enabled toggle is the other half: leave the node in the graph permanently, flip it off during testing, and turn saving back on only when you want files - no more muting whole groups to stop writes.
The one input that looks redundant is worth a second look: both this node and TA Save Image With Prompt take positive_prompt/negative_prompt, and both can write sidecars. The difference is the format and the switch - this one is JPEG/WebP with quality, the other is always-PNG. Pick the one matching your output need; they're siblings, not rivals.
Install. No Python dependencies; pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/tmode-1960/TA-ComfyUI-Nodes-Pack
or ComfyUI Manager (search "TA ComfyUI Nodes Pack"), restart, under TA Nodes/utils.
Gotchas. JPEG is lossy - 95 is genuinely hard to distinguish from PNG for most content, but if you're saving an image that will later be upscaled or re-edited, lossless wins and you want the PNG sibling instead. Also jpeg_quality is a string-valued dropdown in the schema, not a slider, which catches people expecting a continuous range. And the pack's v2.x breaking change: old TA v1 save workflows need rebuilding.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | β | |
| filename_prefix | STRING | ComfyUI | β |
| enabled | BOOLEAN | true | β |
| save_txt | COMBO | enabled | 2 options: enabled, disabled |
| positive_prompt | STRING | β | |
| negative_prompt | STRING | β | |
| save_formatopt | COMBO | jpg | 2 options: jpg, webp |
| jpeg_qualityopt | COMBO | 95 | 5 options: 70, 80, 90, 95, 100 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |