Nodes/ComfyUI_PromptStudio/Save as WebP Conditional
ComfyUI Node

Save as WebP Conditional

The save node that knows when to shut up

By tiko13·Created 2 months ago·Updated 6 days ago· 4
Save as WebP Conditional
  • images
  • IMAGE
filename_prefixComfyUI
mode
compression80
save

Save as WebP Conditional is a save node with a save switch on the front panel - flip it to no and it stops writing files but keeps showing you previews. That's the whole personality of the thing, and it's genuinely useful when you're iterating on a workflow and don't want your output folder drowning in test renders. It rides along in Prompt Studio because that pack's whole flow is "generate, revise, generate again" - exactly the situation where a save node that can be told to sit this one out pays for itself.

It also writes your prompt and workflow into the file's EXIF metadata, which is the other half of its appeal: the render carries its own provenance around with it.

How it works

It's a straightforward PIL WebP save, ComfyUI-style. Inputs:

  • images - the IMAGE tensor to save (and to pass through).
  • filename_prefix - default "ComfyUI"; supports %width% and %height% substitutions.
  • mode - lossy or lossless.
  • compression - 1–100; this is the quality knob for lossy (default 80), less meaningful for lossless.
  • save - yes writes to your ComfyUI output directory; no writes to the temp directory instead, so you still get a preview in the UI without committing a permanent file. Files land in a date-stamped subfolder with the usual counter naming (name_00001_.webp).

The metadata part: the node stuffs the current prompt into EXIF tag 0x010F (as Prompt: {json}) and the workflow JSON into 0x010E, so a render saved from a [PS] workflow can later be inspected and re-queued. It's an output node, and its IMAGE output passes the images through unchanged, which means you can chain it in front of a viewer if you want both save-and-display behavior.

Why you'd reach for it

WebP is noticeably smaller than PNG for the same pixels - good if you're shipping files or just hoarding less. The save: no mode is the killer feature for iteration: keep the node in your workflow permanently, and only flip it to yes when you actually want to keep a result. That's a nicer loop than adding and removing a Save Image node each time.

Installing it

It's part of Prompt Studio, so:

cd ComfyUI/custom_nodes
git clone https://github.com/tiko13/ComfyUI_PromptStudio

Restart ComfyUI (or search "ComfyUI_PromptStudio" in ComfyUI Manager). No pip dependencies and no LLM server needed for this node - it's pure image I/O, so it works even if you never configure KoboldCpp at all.

Where people get burned

  • It's an output node. ComfyUI treats it as a workflow endpoint. If it's mid-graph you'll get confusing behavior; put it at the end.
  • WebP isn't universally loved downstream. Some previewers, image tools, and metadata readers expect PNG, and WebP's EXIF support is spottier than PNG's text chunks. If you later can't find metadata where you expect it, that's why - and it's the main argument for plain Save Image.
  • compression on lossless. People crank it expecting quality control; on lossless it mostly does nothing visible. If file size matters in lossless mode, you're better off in lossy.
Categoryimage

Inputs (5)

NameTypeDefaultDescription
imagesIMAGE
filename_prefixSTRINGComfyUI
modeCOMBO2 options: lossy, lossless
compressionINT801–100
saveCOMBO2 options: yes, no

Outputs (1)

NameTypeDescription
IMAGEIMAGE