🖼️💾AGSoft Save Image
A save node that stops overwriting your work — dated folders, real formats, no collisions
- images
- images
- saved_paths
- saved_dir
ComfyUI's stock Save Image node is fine until you run the same workflow twice and it stomps your files. AGSoft Save Image is the pack's answer: an output node with dated subfolders, collision-proof auto-numbering, real format control (PNG/JPG/WebP/BMP), per-format compression settings, and metadata handling that knows PNGs can embed a workflow while JPGs need a sidecar JSON. If you batch-generate a lot, this quietly pays for itself.
How it works
The node is a proper output node (OUTPUT_NODE = True). Each save run builds a directory and picks a filename with its own numbering logic - the source has a get_next_filename routine that scans the folder and bumps the counter so nothing collides, unless you explicitly set overwrite_existing (default off). The one thing to know: by default it creates a YYYY-MM-DD subfolder (create_dated_subfolder, default on), which is the "never lose a run to the same-name problem" feature in practice.
Inputs that matter:
- images - what you're saving.
- filename_prefix - base name, no extension. Default
"image". - output_path - optional subdirectory inside the output folder (e.g.
my_project). Leave empty for the root. - image_format - png / jpg / webp / bmp. Choose once and the matching quality dials matter:
- png_compression 0–9 (default 1 - fast, still lossless; 9 buys bytes at a real time cost).
- jpg_quality / webp_quality 1–100 (default 90 - sane for archival; drop to ~80 for sharing).
- embed_workflow - the smart bit: PNG embeds ComfyUI-readable metadata in the image (like the stock node); JPG/WebP/BMP instead write the workflow to a separate .json file next to the image, because those formats can't carry it the same way.
It returns three outputs - images (pass-through, so you can keep wiring downstream after saving), saved_paths, and saved_dir (the actual folder it wrote to). The latter two are gold for scripting: a Workflow Outputs node or a notifier can read saved_dir and tell you where things went.
Installing and gotchas
cd ComfyUI/custom_nodes
git clone https://github.com/Art-xmaster/comfyui-AGSoft
Restart, or ComfyUI Manager → "comfyui-AGSoft". No models, nothing heavy.
Where people get burned: overwrite_existing is off by default for a reason - flip it on and the numbered-collision protection goes away, and reruns do exactly the thing you installed this to avoid. Also, dated subfolders mean your "output" isn't where the stock node put it; if you search the output dir for a PNG by name and can't find it, look under the 2026-08-16-style folder (or whatever saved_dir reports). And don't expect saved_paths to be a list you can splat into anything - it's a string, handy for logging and file nodes, not a batch list.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | Image(s) to save Изображение(я) для сохранения | |
| filename_prefix | STRING | image | Base filename without extension Базовое имя файла без расширения |
| output_path | STRING | Optional subdirectory in output folder (e.g., 'my_project') Опциональная подпапка в output (например, 'мой_проект') | |
| create_dated_subfolder | BOOLEAN | true | Create YYYY-MM-DD subfolder Создать подпапку с датой ГГГГ-ММ-ДД |
| image_format | COMBO | png | Output image format Формат выходного изображения |
| png_compression | INT | 10–9 | PNG compression level: 0=no compression, 9=max compression Уровень сжатия PNG: 0=без сжатия, 9=максимальное |
| jpg_quality | INT | 901–100 | JPEG quality: 1=worst, 100=best Качество JPEG: 1=худшее, 100=лучшее |
| webp_quality | INT | 901–100 | WebP quality: 1=worst, 100=best Качество WebP: 1=худшее, 100=лучшее |
| overwrite_existing | BOOLEAN | false | Overwrite existing files with same name Перезаписывать существующие файлы с таким же именем |
| embed_workflow | BOOLEAN | true | PNG: save metadata in image (ComfyUI readable) JPG/WebP/BMP: save workflow as separate JSON file PNG: сохранить метаданные в изображении (читается ComfyUI) JPG/WebP/BMP: сохранить workflow как отдельный JSON файл |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| saved_paths | STRING | — |
| saved_dir | STRING | — |