English | 日本語
This is two custom nodes for ComfyUI that allows you to directly download generated images and videos to your local PC.
- Directly save images generated in ComfyUI to your local PC
- Supports downloading in PNG, JPEG, and WebP formats (images), and MP4 (videos)
- Customizable file name prefix
- Automatic generation of file names including timestamps and serial numbers
- Batch processing for downloading multiple images at once
- Custom EXIF text input for image metadata
- Advanced format-specific settings:
- PNG: Compression level control (0-9)
- JPEG: Quality control (1-100)
- WebP: Quality control (1-100) and lossless mode
- Feedback display when saving is complete
- Navigate to the ComfyUI custom nodes directory:
cd ComfyUI/custom_nodes- Clone this repository:
git clone https://github.com/your-username/comfyui_local_save.git- Restart ComfyUI
-
Search for "Local Save Image" in the ComfyUI node browser
-
Add the node and set the following parameters:
prefix: Prefix for the file name to be saved (default: "generated")file_format: Select the save format (PNG/JPEG/WebP)exif_text: Custom text to embed in image EXIF metadata (optional)
-
Advanced format-specific settings (dynamically shown based on selected format):
PNG Settings:
png_compression: PNG compression level (0-9, default: 6)png_optimize: Enable PNG optimization (default: true)
JPEG Settings:
jpeg_quality: JPEG quality (1-100, default: 95)jpeg_optimize: Enable JPEG optimization (default: true)jpeg_progressive: Enable progressive JPEG (default: false)jpeg_subsampling: Color subsampling (4:4:4, 4:2:2, 4:2:0, 4:1:1, default: 4:2:0)
WebP Settings:
webp_quality: WebP quality (1-100, default: 95)webp_lossless: Enable lossless WebP compression (default: false)webp_method: WebP compression method (0-6, default: 6)
-
Connect the output of the image generation node to the input of the "Local Save Image" node
-
When you run the workflow, the generated image will be downloaded automatically
- Search for "Local Save Video" in the ComfyUI node browser
- Add the node and set the following parameter:
prefix: Prefix for the file name to be saved (default: "generated")
- Connect the output of the video generation node to the input of the "Local Save Video" node
- When you run the workflow, the generated video will be downloaded automatically
The file name of the saved image is generated in the following format:
{prefix}_{timestamp}_{number}.{ext}
Example:
generated_20250115_112814_001.png
generated_20250115_112814_002.webp
generated_20250115_112814_003.jpeg
The filename of the saved video is generated in the following format:
{prefix}_{timestamp}.{ext}
Example:
generated_20250115_112814.mp4
prefix: Prefix specified by the usertimestamp: Timestamp in YYYYMMdd_HHmmss formatnumber: 3-digit serial number starting from 001ext: Selected format (png/jpeg/webp)
The node can embed custom text into image metadata using format-appropriate methods:
- EXIF Metadata: Standard EXIF format
- UserComment: Your custom text from the
exif_textparameter - DateTime: Creation timestamp
- Software: "ComfyUI Local Save Node"
- UserComment: Your custom text from the
- Text Chunks: PNG standard text chunks
- Comment: Your custom text
- Software: "ComfyUI Local Save Node"
- Creation Time: Creation timestamp
- Description: Combined description with your text
- Title: "ComfyUI Generated Image"
- Author: "ComfyUI Local Save Node"
- Copyright: Generation date
- EXIF Metadata: EXIF chunk with UserComment field
- UserComment: Your custom text (with UNICODE encoding)
- ImageDescription: Your custom text
- DateTime: Creation timestamp
- DateTimeOriginal: Creation timestamp
- Artist: "ComfyUI Local Save Node"
- Software: "ComfyUI Local Save Node"
To view the embedded metadata in Honeyview:
- Open the saved image in Honeyview
- Right-click on the image and select "Properties" or press F2
- Go to the "Details" tab to view EXIF/metadata information
- For JPEG: Look for "User Comment", "Image Description", "Artist", "Software" in the EXIF section
- For PNG: Look for "Comment", "Software", "Description", "Title", "Author" in the metadata section
- For WebP: Look for "User Comment", "Image Description", "Artist", "Software" in the EXIF section
Alternatively, you can use Ctrl+I to quickly open the properties dialog.
- JPEG: EXIF format with UNICODE encoding for UserComment (37510) for maximum compatibility
- PNG: Standard PNG text chunks (tEXt/iTXt) for metadata storage
- WebP: EXIF chunk with UserComment field for maximum compatibility
- Compression Level (0-9): 0 = no compression (largest file), 9 = maximum compression (smallest file)
- Optimize: Enables PNG optimization for better compression
- Quality (1-100): 100 = best quality (largest file), 1 = lowest quality (smallest file)
- Optimize: Enables JPEG optimization for better compression
- Progressive: Creates progressive JPEG for faster loading
- Subsampling: Color compression method
- 4:4:4 = no color compression (best quality)
- 4:2:2 = moderate color compression
- 4:2:0 = standard color compression (default)
- 4:1:1 = high color compression
- Quality (1-100): 100 = best quality (largest file), 1 = lowest quality (smallest file)
- Lossless: Preserves all image data (ignores quality settings)
- Method (0-6): Compression method, higher values = better compression but slower
- Dynamic UI: Advanced settings are automatically shown/hidden based on the selected file format
- Depending on your browser settings, downloading multiple files may be restricted
- Please be aware of memory usage when processing a large number of images at once
- WebP format provides excellent compression with quality control
- PNG compression level 0 = no compression (largest file), 9 = maximum compression (smallest file)
- JPEG quality 100 = best quality (largest file), 1 = lowest quality (smallest file)
- WebP lossless mode ignores quality settings and preserves all image data
Dependencies:
torch>=2.0.0
Pillow>=9.0.0
numpy>=1.22.0
piexif>=1.1.3
Most packages are included in the standard ComfyUI installation. You may need to install piexif separately:
pip install piexif>=1.1.3Please submit bug reports and feature requests via GitHub Issues.