-
Notifications
You must be signed in to change notification settings - Fork 1
Save Preview Images
github-actions[bot] edited this page Aug 15, 2026
·
4 revisions
Back to Wiki Home
The Save Preview Images node saves input images with various options including format (PNG/JPG), quality, metadata, and custom paths. It can also save the workflow as JSON and generate preview images. Preview images are controlled by the same options. The save function can be disabled to use the node solely for preview purposes.
-
Class name:
zyd232_SavePreviewImages -
Category:
zyd232 Nodes -
Output node:
OUTPUT_NODE = True(no data output, UI preview only)
| Input | Type | Description |
|---|---|---|
| images | IMAGE |
Images to save |
| save_image | BOOLEAN |
Whether to perform the save operation (default true) |
| save_workflow_as_json | BOOLEAN |
Whether to save the workflow as JSON (default false) |
| preview | BOOLEAN |
Whether to generate preview images (default true) |
| format | ["png", "jpg"] |
Output image format |
| quality | INT |
Image quality (default 85, range 0–100) |
| meta_data_png | BOOLEAN |
Whether to write metadata into PNG (default true) |
| custom_path | STRING |
Custom save path (default empty) |
| filename_prefix | STRING |
Filename prefix (default ComfyUI_) |
| timestamp | ["second", "millisecond", "None"] |
Filename timestamp mode |
No data output. The node returns a preview image list via UI (type: "temp").
- Supports PNG and JPG formats.
-
quality controls compression: PNG uses
compress_level(computed as(100 - quality) // 10), JPG uses thequalityparameter. - When
save_image = false, actual saving is skipped; the node is used for preview only.
-
filename_prefix supports
%date(YYYY-MM-DD) and%time(HH-MM-SS) placeholders. -
timestamp determines the filename suffix:
-
second— appendsYYYY-MM-DD_HH-MM-SS -
millisecond— appendsYYYY-MM-DD_HH-MM-SS-fff -
None— uses a counter (_00001, etc.)
-
- If a file already exists, the counter is incremented automatically to avoid overwriting.
-
custom_path supports
%dateand%timeplaceholders. - The directory is created automatically if it does not exist.
- Leave empty to save to the ComfyUI default output directory.
- When
meta_data_png = true, thepromptandextra_pnginfo(including the workflow) are written into the PNG metadata.
- When
save_workflow_as_json = true, the workflow is saved as a.jsonfile with the same name as the image. - If no workflow data is found, a message is printed and saving is skipped.
- When
preview = true, a preview image is generated (saved to the temp directory) and shown in the UI. - Preview filenames use a random name (
saveimage_preview_*) or a timestamped name.
-
Preview only: set
save_image = false,preview = trueto view the result on the canvas without writing to disk. -
Save PNG with workflow: set
format = png,save_workflow_as_json = true,meta_data_png = true. -
Archive by date: set
custom_path = "outputs/%date",filename_prefix = "img_%date".
Back to Wiki Home