Nodes Browser
ComfyDeploy: How ComfyUI-Pixelate works in ComfyUI?
What is ComfyUI-Pixelate?
[a/sd-webui-pixelart](https://github.com/mrreplicart/sd-webui-pixelart) are referenced by many webui users, this node is mean to use it in ComfyUI.
How to install it in ComfyDeploy?
Head over to the machine page
- Click on the "Create a new machine" button
- Select the
Edit
build steps - Add a new step -> Custom Node
- Search for
ComfyUI-Pixelate
and select it - Close the build step dialig and then click on the "Save" button to rebuild the machine
ComfyUIPixelate
sd-webui-pixelart are referenced by many webui users, this node is mean to use it in ComfyUI.
Features
-
Downscaling Options: Multiple high-quality scaling algorithms:
auto
: Automatically selects the best methodnearest
: Best for preserving exact colorsarea
: Optimal for general downscalinglinear
: Smooth transitions but may blurcubic
: Sharper edges than linearlanczos
: High quality with edge preservation
-
Color Processing:
- RGB color mode
- Grayscale conversion
- Binary (Black & White) conversion
-
Advanced Color Quantization:
- Multiple palette generation methods:
auto
: Smart method selection based on image size and color countlibimagequant
: High-quality quantizationkmeans
: GPU-accelerated when available (falls back to CPU)mediancut
: Fast with good qualitymaxcoverage
: Better color distributionfastoctree
: Fastest option for large imagesmedian_cut
: Custom implementation
- Multiple palette generation methods:
-
Dithering Support:
- Floyd-Steinberg dithering for smooth color transitions
- Simple quantization for clean, sharp results
-
Custom Palette Support:
- Use reference images to extract palettes
- Control palette size (2-256 colors)
Usage
- Add the "Pixelate" node to your ComfyUI workflow
- Connect an image input
- Configure parameters:
downscale_factor
: How much to reduce the image (1-32)scale_mode
: Choose scaling algorithmrescale_to_original
: Option to restore original sizecolor_mode
: RGB/Grayscale/BWcolors
: Number of colors in output (2-256)quantization_method
: Palette generation methoddithering
: None or Floyd-Steinberg- Optional: Connect a palette reference image
Performance Considerations
- The node automatically selects optimal methods based on image size:
- Large images (>1M pixels) or many colors (>32): Uses fast octree
- Medium images (>500K pixels): Uses libimagequant
- Small images: Uses k-means clustering
- GPU acceleration for k-means when available
- Caching for color quantization to improve speed
Credits
- Original concept based on sd-webui-pixelart