SaveImageAsSDWebUI
Why this node exists
ComfyUI's built-in SaveImage dumps all files flat into the output directory — no global sequence numbers, so batch-generated files don't always sort in generation order. Stable Diffusion WebUI organizes images by date automatically, making browsing much easier.
Let's be honest: I'm just used to WebUI and don't want to leave my comfort zone.
This node brings WebUI's date-based directory structure and global sequence numbering to ComfyUI while preserving ComfyUI's workflow metadata embedding (PngInfo for PNG, EXIF for WebP), and adds a prefix parameter for custom subdirectories and filename prefixes.
Usage
Replace the built-in SaveImage node — no extra wiring needed. The seed is automatically resolved from the first KSampler node in the workflow.
Parameters
| Parameter | Description |
|---|---|
images |
Images to save |
filename_prefix |
Controls both subdirectory and filename prefix, see rules below |
image_format |
Save format: png / jpg / webp |
quality |
Compression quality for jpg and webp (0-100), ignored for png |
Seed: Automatically read from the first KSampler node in the workflow and embedded in the filename (e.g.
00001-12345.webp) for easy cross-reference with generation settings. Defaults to 0 if no KSampler is found.
Prefix rules
A date folder yyyy-mm-dd is always the direct parent of the file. Prefix paths nest above the date folder.
| prefix | Output path |
|---|---|
txt2img/ |
output/txt2img/2026-05-25/00001-seed.webp |
abc |
output/2026-05-25/abc00001-seed.webp |
imgEdit/qwen |
output/imgEdit/2026-05-25/qwen00001-seed.webp |
"" |
output/2026-05-25/00001-seed.webp |
abc/def/ |
output/abc/def/2026-05-25/00001-seed.webp |
abc/def/114514 |
output/abc/def/2026-05-25/11451400001-seed.webp |
Rules:
- Ends with
/→ directory only, no filename prefix - No
/→ filename prefix only, no subdirectory - Contains
/in the middle → everything before the last/is directory, after is filename prefix
Metadata embedding
- PNG: prompt and workflow written via PngInfo
- WebP: prompt and workflow written via EXIF (Make/ImageDescription tags)
- JPG: no metadata support