Extensions/Smart Image Quantize
ComfyUI Extension

Smart Image Quantize

Perceptual image color quantization with priority hues and palette control for ComfyUI. 優先色相とパレット制御に対応したComfyUI向け知覚的画像減色ノードです。

By palealloy2999-prog·Created 5 months ago·Updated a day ago· 0
palealloy2999-prog/comfyui_smart_image_quantize
Nodes
On cloudLocal install
Stars0
Updateda day ago
Readme

Smart Image Quantize for ComfyUI

日本語

Smart Image Quantize is a ComfyUI custom node for reducing the number of colors in an image while preserving prominent colors, selected hues, and bright neutral highlights.

It supports optional palette images and none, Floyd–Steinberg, and Bayer dithering.

<img width="2506" height="1218" alt="Comparison of the original image, ImageQuantize, and Smart Image Quantize" src="https://github.com/user-attachments/assets/ba2bfc33-30e4-4fd1-b548-171ac0502956" />

Left: Original / Center: ComfyUI ImageQuantize / Right: Smart Image Quantize

Installation

Clone this repository into ComfyUI/custom_nodes, then restart ComfyUI.

cd ComfyUI\custom_nodes
git clone https://github.com/palealloy2999-prog/comfyui_smart_image_quantize.git

Usage

Add Smart Image Quantize from image/postprocessing, connect an IMAGE, and set the desired number of colors.

Main settings:

  • colors: Number of colors in the output palette (2–256)
  • accent_colors: Amount of palette space reserved for vivid accent colors
  • accent_hue_priority / accent_hue_2nd_priority: Hues to preserve preferentially
  • neutral_highlights: Amount reserved for bright neutral colors
  • min_dist: Minimum distance between selected palette colors
  • dither: Dithering method
  • palette_image: Optional image used as a fixed or extendable palette
  • palette_fill_mode: strict uses only the supplied palette; extend fills missing colors from the input image

The node outputs the quantized IMAGE and a palette preview IMAGE.