A comprehensive ComfyUI custom node for organizing and optimizing your generated images. Archive output files into date-structured folders and convert PNG images to JPEG/WebP with full workflow metadata preservation, saving 85-95% disk space.
- UI Button Integration: Easy one-click archiving directly from the ComfyUI interface
- Settings Panel: Configure archive behavior through a convenient settings dialog
- Date-based organization: Files are organized by their modification date (YYYY-MM-DD)
- Structure preservation: Maintains original subdirectory structure within archives
- Flexible filtering: Skip hidden files and specific file extensions
- Automatic cleanup: Removes empty directories after archiving
- Persistent Settings: Your preferences are saved and remembered
- Backward Compatible: Also includes a workflow node for automation
- PNG to JPEG/WebP conversion: Reduce file sizes by 85-95% while preserving quality
- Workflow metadata preservation: Maintains ComfyUI workflow data in EXIF tags
- Drag-and-drop restore: Load workflows from compressed images
⚠️ Requires ComfyUI-Image-Saver extension - Configurable quality: Adjust compression quality (70-100%, default 90%)
- Format options:
- JPEG: Lossy compression, widely supported, good for final outputs
- WebP: Lossy compression with better quality/size ratio, supports lossless mode
- Safe operation: Option to keep original files until you verify quality
- Batch processing: Convert all PNG files in your output directory at once
- Smart fallback: Handles large workflows with automatic fallback strategy
- Open ComfyUI Manager
- Search for "Archive Output"
- Click Install
-
Navigate to your ComfyUI custom nodes directory:
cd ComfyUI/custom_nodes -
Clone this repository:
git clone https://github.com/jonstreeter/comfyui-archive-output.git
-
Install dependencies:
cd comfyui-archive-output pip install -r requirements.txt -
Restart ComfyUI
To restore workflows by dragging compressed JPEG/WebP images into ComfyUI, install ComfyUI-Image-Saver:
cd ComfyUI/custom_nodes
git clone https://github.com/alexopus/ComfyUI-Image-Saver.gitWithout this extension, compressed images will still be viewable but won't restore workflow data when dragged into ComfyUI.
-
Open Settings: Click the gear/settings icon in ComfyUI (bottom right corner)
-
Navigate to Archive Output: In the settings panel, expand the "Archive Output" section
-
Configure Settings (Optional):
- Archive Folder Name: Name of the archive folder (default: "Archive")
- Skip Hidden Files: Skip files starting with
.(default: enabled) - Skip File Extensions: Comma-separated list of file extensions to skip (default:
.py,.js,.bat,.sh,.json,.yaml,.yml)
-
Execute Archive:
- In the "Archive Output" > "Actions" section, click the "📦 Archive Now" button
- A progress dialog will appear
- When complete, you'll see a summary of files moved, skipped, and any errors
The image conversion feature allows you to reduce disk space usage by converting PNG files to JPEG or WebP format while preserving ComfyUI workflow metadata.
-
Open Settings: Click the gear/settings icon in ComfyUI
-
Configure Compression (under "Archive Output" > "Compression Settings"):
- Target Folder: (Optional) Specify folder to compress
- Leave empty for main output folder
- Enter relative path like
ArchiveorArchive/2025-01-15 - Or absolute path like
G:/AIART/output/Archive
- Include Subdirectories: Process all subdirectories recursively (default: enabled)
- When enabled, processes all PNG files in all nested folders
- Includes Archive folders (no folders are skipped)
- Compression Quality: Adjust quality slider (70-100%, default 90%)
- 90%: Recommended - visually lossless for most images, ~90% space savings
- 95%: Higher quality, slightly larger files
- 85%: More aggressive compression, smaller files
- Output Format: Choose WebP or JPEG
- WebP (Recommended/Default): Better compression ratio, full metadata support, no size limits, supports lossless mode
- JPEG: Lossy compression, more widely compatible, but EXIF metadata limited to 65KB
- Delete Original PNG:
⚠️ Warning - This is irreversible!- Keep disabled until you verify compressed images meet your needs
- Target Folder: (Optional) Specify folder to compress
-
Execute Compression:
- In the "Archive Output" > "Actions" section, click the "🗜️ Compress Now" button
- A real-time progress dialog appears showing:
- Animated progress bar with percentage
- Current file being processed
- Files compressed so far
- Running space savings total
- Cancel button to stop at any time
- When complete (or cancelled), you'll see a summary:
- Number of files compressed
- Space savings (MB and percentage)
- Metadata preservation status (full/partial/none)
-
View Results:
- Original PNGs are converted to .jpg or .webp files in the same location
- Workflow metadata is embedded in EXIF tags
- To restore workflows: Install ComfyUI-Image-Saver, then drag compressed images into ComfyUI
- If "Delete Original PNG" was enabled, PNG files are removed after successful compression
Typical Savings:
- 100 images @ 5MB each (PNG) → 500 MB total
- After compression (JPEG 90%) → 50 MB total
- Space saved: 450 MB (90% reduction)
The compression feature preserves ComfyUI workflow data using EXIF metadata:
- Full workflow preserved: Both workflow and prompt data (most common for simple/medium workflows)
- Workflow only: Workflow preserved, prompt removed due to size limits
- No metadata: Workflow too large for JPEG EXIF (65KB limit)
- Solution: Use WebP format for better metadata support
- Or keep original PNG for very complex workflows
- Start with "Delete Original PNG" disabled - Verify quality first
- Use WebP format (default) - Better compression and no metadata size limits
- Use 90% quality - Sweet spot between quality and file size
- Test drag-and-drop - Verify workflow restoration works before mass compression
- Archive first, compress second - Organize files before compressing for easier management
- Large batches: Progress bar updates in real-time, you can cancel anytime if needed
- Tens of thousands of images? - The process handles it! Just click compress and monitor progress
- Compress archived files: Set Target Folder to
Archiveto compress all your archived PNGs - Compress specific date: Set Target Folder to
Archive/2025-01-15to compress just one day's images
Files are organized by modification date:
output/
Archive/
2025-01-15/
image_001.png
image_002.png
2025-01-16/
subfolder/
image_003.png
For automation, a workflow node is also available:
Node Inputs:
trigger: Any type - Connect any node output to trigger the archive processenabled: Boolean (default: True) - Enable/disable archivingarchive_folder_name: String (default: "Archive") - Name of the archive folderskip_hidden_files: Boolean (default: True) - Skip files starting with.skip_extensions: String - Comma-separated list of file extensions to skip
Node Outputs:
status: String - Summary of the archive operation
You can customize which file types to skip during archiving. By default, these extensions are skipped:
.py- Python files.js- JavaScript files.bat- Batch files.sh- Shell scripts.json- JSON files.yaml,.yml- YAML files
To modify, edit the skip_extensions parameter with a comma-separated list.
The archive folder is created inside your ComfyUI output directory. You can customize the folder name using the archive_folder_name parameter.
- Files are moved (not copied) to the archive
- If a file with the same name already exists in the archive, it will be skipped
- The archive folder itself is never processed to prevent recursive archiving
- Empty directories are automatically removed after archiving
- ComfyUI
- Python 3.8+
- Pillow (PIL) - Usually included with ComfyUI
- piexif >= 1.1.3 - For EXIF metadata handling (compression feature)
Dependencies are automatically installed via requirements.txt.
- ComfyUI-Image-Saver - Required to restore workflows from compressed JPEG/WebP images by drag-and-drop
- Without this: Compressed images are viewable but won't restore workflow data
- With this: Drag compressed images into ComfyUI to restore the original workflow
- Restart ComfyUI completely
- Hard refresh browser:
Ctrl + Shift + R(Windows/Linux) orCmd + Shift + R(Mac) - Check browser console (F12) for errors
- Ensure
piexifis installed:pip install piexif - Check ComfyUI console for detailed error messages
- Verify PNG files are not corrupted
- Check write permissions on the output directory
- Verify the archive folder name doesn't contain invalid characters
- Compression methodology inspired by ComfyUI-Image-Saver by alexopus
- Metadata preservation uses EXIF embedding technique from ComfyUI-Image-Saver
MIT License - See LICENSE file for details
Contributions are welcome! Please feel free to submit a Pull Request.
For issues, questions, or feature requests, please visit the GitHub Issues page.