ComfyUI Image Process
A collection of image-processing nodes designed to enhance and refine AI-generated images within ComfyUI workflows.
What's New in v1.3.0
ICO Packer and advanced ICO save
-
ICO Packer collects per-size
image_N/mask_Npairs (16–256 px) into oneICO_PACKERoutput. Use the node context menu: Add Input (single size dialog), Batch Add Input (queue sizes then apply), or Remove Input. -
Save Image Advanced (ICO) now takes only the ICO Packer socket. Per-size image/mask slots on the saver were removed; wire sources into the packer instead.
-
Crop Images on ICO Packer: when enabled, oversize frames are cropped to each slot’s size (masks use the same window).
-
Reference Point (
centerortop-left): crop anchor when Crop Images is on (disabled in the UI when cropping is off).
Example workflow: workflows/example_workflow_imagesv_ico.json.
Nodes Included
1. Achromatic Stabilizer
Corrects achromatic color instability commonly found in AI-generated images.
-
Artifact Detection: Identifies near-zero saturation pixels.
-
Saturation Threshold: Adjusts sensitivity to define artifacts (0.0 - 1.0).
-
Smart Normalization: Converts artifact pixels to neutral grey.
-
Optional Smoothing: Blends corrected areas with the image.
-
Alpha Channel Preservation: Maintains transparency during processing.
-
Invert Alpha: Inverts the alpha channel.
-
Dual Output: Returns both image and alpha mask separately.
2. Color Patch Flatten
Homogenizes colors by flattening their HSV values across patches within a given tolerance.
-
HSV Control: Independently toggles flattening for Hue (H), Saturation (S), and Brightness (V).
-
Tolerance Handling: Flattens values only within the specified tolerance. Larger numbers mean a weaker effect.
-
Alpha Mask Support: Restricts the region for color calculation and flattening.
3. Color Patch Merge
Groups adjacent similar colors and replaces them with their local averages, clustering pixels into solid patches.
-
Merge Solutions:
-
Smooth: Uses a bilateral filter to smooth colors while preserving edges (controlled by
Neighborhood). -
Unify: Iteratively grows solid color regions in Lab space (controlled by
IterationsandMinimal Area).
-
-
Lab Color Space: Optionally converts RGB to Lab space for perceptually accurate grouping.
-
Detail Preservation: "Unify" protects high-gradient edges and small regions below the
Minimal Area.
4. Load ICC Profile
Loads an ICC color profile from models/icc_profiles.
-
Profile Selection: Choose valid
.iccor.icmfiles. -
Embedding: Outputs profile data for the
Save Image Advancednode. -
Profile Information: Outputs metadata (Model, Manufacturer, Description, Copyright).
Warning
BMPandTGAdo not support ICC Profile embedding.
5. Save Image Advanced
Saves images with alpha channels and metadata.
-
ICC Profile: Embeds a custom color profile.
-
Disable Metadata: Discards workflow metadata to reduce file size.
-
Join Alpha Channel: Clips the image with a mask, similar to
Join Image with Alpha. -
Invert Alpha: Inverts the alpha channel.
-
Compression Level: PNG compression (0-9).
-
Quality: JPEG/WebP quality (1-100).
-
DPI: Sets DPI metadata (1–600, default: 300).
-
TIFF Compression: Supports LZW, Deflate, CCITT, etc.
-
TGA RLE Compression: Toggles RLE compression for TGA.
-
Format: Supports
JPG,PNG,WebP,TIFF,BMP, andTGA. -
Bit Depth:
24bitor32bitfor BMP (32-bit supports alpha). -
Save to Input Folder: Copies the saved file to the input folder for reuse.
-
Filename prefix tokens: Dynamic tokens in Filename Prefix (independent from ComfyUI core). Right-click the node for Insert Filename Token.
| Token | Output | Example |
|---|---|---|
| %date:FORMAT% | Date/time with custom format | %date:yyyy-MM-dd% → 2026-06-28 |
| %year% | 4-digit year | 2026 |
| %month% | 2-digit month | 06 |
| %day% | 2-digit day | 28 |
| %hour% | 2-digit hour (24 h) | 21 |
| %minute% | 2-digit minute | 05 |
| %second% | 2-digit second | 00 |
| %width% | Image width in pixels | 1024 |
| %height% | Image height in pixels | 1024 |
%date:FORMAT% uses yyyy, yy, MM, dd, HH, hh, mm, ss (e.g. photos/%date:yyyy-MM-dd%/shot → photos/2026-06-28/shot).
Warning
The internal class name of Save Image (Advanced) is
SaveImageAdvancedCustom(ComfyUI core also exposes a node named Save Image Advanced).
6. Dedicated Format Savers
Format-specific savers with simple and advanced variants.
-
JPG: Quick saves or advanced EXIF/DPI control.
-
BMP: Standard saves or 32-bit alpha/DPI support.
-
TIFF: Standard saves or advanced compression/EXIF options.
-
TGA: Standard saves or RLE compression/alpha support.
-
AVIF: Standard saves or advanced quality/speed control.
Warning
ComfyUI may not display TIFF or TGA files properly in the preview pane. The preview is a PNG copy, but the actual file is saved in your chosen format.
Tip
tiff_ccittis for black-and-white documents or line-art. For photography, usetiff_lzw,tiff_deflate, ortiff_adobe_deflate.
7. ICO Packer
Prepares multi-resolution icon inputs for Save Image Advanced (ICO).
-
Dynamic size slots: Add
image_<size>andmask_<size>pairs via the context menu (standard sizes: 16, 24, 32, 48, 64, 128, 256 px; up to seven unique sizes). -
ICO_PACKER output: Bundled images, optional masks, and size order for the saver.
-
Crop Images: Crops frames (and masks) down when both dimensions are at least the slot size.
-
Reference Point:
centerortop-leftcrop anchor when cropping is enabled.
8. Save Image (ICO) / Save Image Advanced (ICO)
Saves images as Windows .ico files.
Save Image (ICO) — simple batch input:
-
Accepts any batch of images; each frame is checked against valid ICO dimensions (16, 24, 32, 48, 64, 128, 256 px square).
-
Valid frames are bundled into a single
.icofile. -
Invalid frames are optionally saved as individual
_INVALID.pngfiles.
Save Image Advanced (ICO) — packer-driven:
-
Connect ICO Packer to the saver’s ICO Packer input.
-
Color Depth:
8bit(256-color palette),16bit(RGB), or32bit(RGBA). -
Compression:
none(standard BMP frames),ZIP(PNG-compressed frames, Windows Vista+). -
Join Alpha Channel / Invert Alpha: Applies the per-size mask from the packer, with optional inversion.
-
Sort by Size: Reorders frames from smallest to largest before bundling (otherwise packer order).
-
Save to Input Folder: Copies the
.icoto the input folder for immediate reuse. -
Save Invalid as PNG: Saves size-mismatched images as fallback PNGs.
Tip
Typical chain: resize or crop sources → ICO Packer (add only the sizes you need) → Save Image Advanced (ICO).
Example Usage
The Achromatic Stabilizer is particularly useful for:
-
Removing color noise from near-white or near-black regions.
-
Improving consistency for models prone to desaturated, hue-unstable pixels.
-
Preserving transparency while correcting color artifacts.
To use the node:
-
Connect to Image.
-
(Optional) Connect an Alpha Mask.
-
Adjust Saturation Threshold (lower = more aggressive).
-
Enable Smooth Transitions to blend corrected areas.
-
Set Smoothing Kernel Size for blending intensity.
-
Toggle Preserve Alpha as needed.
The Save Image Advanced node can finalize your workflow with extra tweaks:
The example above removes the background and sends the mask to save with an alpha channel.
Enable Disable Metadata to reduce file size at the cost of workflow readability.
Installation
Method 1: ComfyUI Manager (Recommended)
-
Install ComfyUI-Manager.
-
Click on "Install via Git URL".
-
Paste the URL:
https://github.com/wakaura-asaho/comfyui-image-process -
Restart ComfyUI.
Method 2: Manual Installation
-
Open a terminal in
ComfyUI/custom_nodes. -
Clone this repository:
git clone https://github.com/wakaura-asaho/comfyui-image-process.git
- Install dependencies:
pip install -r comfyui-image-process/requirements.txt
- Restart ComfyUI.
Warning
Dependency Notice: Use
pip install -r requirements.txt --upgrade-strategy only-if-neededto avoid unnecessary version conflicts.
File Structure
-
image_process.py: Backend logic and node class definitions. -
image_helper.py: Shared save helpers including the filename prefix resolver. -
web/image_process.js: Frontend extensions (widget visibility, filename token menu, ICO Packer dynamic inputs). -
workflows/: Example workflows. -
docs/: Screenshots referenced in this README.
Usage Tips
Tip
Saturation Threshold: Start at 0.08. Use lower values (e.g., 0.05) for more aggressive correction, or higher values (e.g., 0.15) to be conservative.
Tip
Smoothing Kernel Size: Use 3-5 for subtle corrections. Try 7-15 for pronounced smoothing, though it may blur regions.
Tip
Alpha Preservation: Enable Preserve Alpha with an optional mask to maintain transparency.
Tip
Filename tokens: Right-click any save node and choose Insert Filename Token to append a token without typing. Combine tokens freely, e.g.
renders/%date:yyyy-MM-dd%/%hour%-%minute%.
Tip
ICO workflow: Enable Crop Images on ICO Packer when sources are larger than the target size; use center for icons and top-left when alignment matters.
Compatible Versions and Notices
Designed for modern ComfyUI versions (V3 nodes).
-
Tested Environment: Frontend >= v1.37.11, base >= 0.12.3
-
Dependencies: NumPy >= 2.3.5, Pillow >= 12.1.0, SciPy >= 1.16.3, scikit-image >= 0.26.0






