ComfyUI > Nodes > ComfyUI PixelArt Detector > 🎨PixelArt Palette Converter

ComfyUI Node: 🎨PixelArt Palette Converter

Class Name

PixelArtDetectorConverter

Category
image/PixelArt🕹️
Author
dimtoneff (Account age: 3423days)
Extension
ComfyUI PixelArt Detector
Latest Updated
2024-06-14
Github Stars
0.17K

How to Install ComfyUI PixelArt Detector

Install this extension via the ComfyUI Manager by searching for ComfyUI PixelArt Detector
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI PixelArt Detector in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

🎨PixelArt Palette Converter Description

Transform images into pixel art with reduced color palette and pixelization techniques for retro-style graphics and simplified images.

🎨PixelArt Palette Converter:

The PixelArtDetectorConverter node is designed to transform images into pixel art by reducing the color palette and applying various pixelization techniques. This node is particularly useful for AI artists who want to create retro-style graphics or simplify images for stylistic purposes. It leverages both PIL (Python Imaging Library) and OpenCV to offer flexible and efficient color quantization methods, ensuring high-quality results. The node can handle different dithering techniques and allows for palette swapping, making it a versatile tool for generating pixel art from any image. By using this node, you can achieve a distinct pixelated look that is reminiscent of classic video games and digital art.

🎨PixelArt Palette Converter Input Parameters:

pixelize

This parameter determines the method used for color quantization. Options include Image.quantize for using PIL's quantization method and OpenCV.kmeans.reduce for using OpenCV's k-means clustering. The choice of method impacts the quality and style of the pixel art. Image.quantize is generally faster and suitable for simpler images, while OpenCV.kmeans.reduce offers more control and can handle more complex images.

dither

This parameter specifies the dithering technique to be applied before quantization. Options include none, floyd-steinberg, bayer-2, bayer-4, bayer-8, and bayer-16. Dithering helps to reduce color banding and create a smoother transition between colors. floyd-steinberg is a popular choice for its balance between quality and performance, while the bayer options offer different levels of dithering intensity.

cleanup_colors

A boolean parameter that, when enabled, cleans up stray colors that may not fit well with the overall palette. This helps in achieving a more cohesive look. The default value is False.

cleanup_pixels_threshold

This parameter sets the threshold for cleaning up stray pixels. It is a float value ranging from 0.001 to 1.0, with a default value of 0.02. Lower values result in more aggressive cleanup, while higher values are more lenient.

resizeBefore

A boolean parameter that determines whether the image should be resized before applying pixelization. This can be useful for optimizing performance and ensuring that the pixel art maintains its intended resolution. The default value is False.

resize_w

This parameter sets the width to which the image should be resized if resizeBefore is enabled. It is an integer value and should be set according to the desired output dimensions.

resize_h

This parameter sets the height to which the image should be resized if resizeBefore is enabled. It is an integer value and should be set according to the desired output dimensions.

🎨PixelArt Palette Converter Output Parameters:

PILOutput

The primary output of the node is the pixelated image, represented as a PIL (Python Imaging Library) image object. This output can be further processed or saved as needed. The pixelated image will have reduced colors and a distinct pixel art style, making it suitable for various artistic applications.

🎨PixelArt Palette Converter Usage Tips:

  • For best results, choose the Image.quantize method for simpler images and OpenCV.kmeans.reduce for more complex images.
  • Experiment with different dithering techniques to achieve the desired level of smoothness and detail in your pixel art.
  • Enable cleanup_colors to ensure a more cohesive color palette, especially when working with images that have a lot of stray colors.
  • Use the resizeBefore parameter to optimize performance and maintain the intended resolution of your pixel art.

🎨PixelArt Palette Converter Common Errors and Solutions:

"Invalid quantization method"

  • Explanation: This error occurs when an unsupported quantization method is selected.
  • Solution: Ensure that the pixelize parameter is set to either Image.quantize or OpenCV.kmeans.reduce.

"Dithering method not recognized"

  • Explanation: This error occurs when an unsupported dithering method is selected.
  • Solution: Ensure that the dither parameter is set to one of the supported options: none, floyd-steinberg, bayer-2, bayer-4, bayer-8, or bayer-16.

"Resize dimensions too small"

  • Explanation: This error occurs when the resize dimensions are below the minimum threshold.
  • Solution: Ensure that resize_w and resize_h are set to values above the minimum resize threshold specified in the settings.

🎨PixelArt Palette Converter Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI PixelArt Detector
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.