Nodes/ComfyUI PixelArt Detector/🎨PixelArt Palette Converter
ComfyUI Node

🎨PixelArt Palette Converter

A ComfyUI node in image/PixelArt🕹️ with 22 inputs and 1 output.

By dimtoneff·Created 3 years ago·Updated 9 months ago· 420
🎨PixelArt Palette Converter
  • images
  • paletteList
  • IMAGE
â—„paletteGAMEBOYâ–ş
â—„resize_w512â–ş
â—„resize_h512â–ş
â—„resize_typecontainâ–ş
â—„pixelizeImage.quantizeâ–ş
â—„grid_pixelate_grid_scan_size2â–ş
â—„reduce_colors_before_palette_swapfalseâ–ş
â—„reduce_colors_methodImage.quantizeâ–ş
â—„reduce_colors_max_colors128â–ş
â—„apply_pixeldetector_max_colorstrueâ–ş
â—„image_quantize_reduce_methodMAXCOVERAGEâ–ş
â—„opencv_settingsOpenCV.kmeans: only when reducing is enabled. RANDOM_CENTERS: Fast but doesn't guarantee same labels for the same image. PP_CENTERS: Slow but will yield optimum and consistent results for same input image. attempts: to run criteria_max_iterations so it gets the best labels. Increasing this value will slow down the runtime a lot, but improves the colors! â–ş
â—„opencv_kmeans_centersRANDOM_CENTERSâ–ş
â—„opencv_kmeans_attempts10â–ş
â—„opencv_criteria_max_iterations10â–ş
â—„pycluster_kmeans_metricsEUCLIDEAN_SQUAREâ–ş
â—„cleanupClean up colors: Iterate and eliminate pixels while there was none left covering less than the 'cleanup_pixels_threshold' of the image. Optionally, enable the 'reduce colors' option, which runs before this cleanup. Good cleanup_threshold values: between .01 & .05â–ş
â—„cleanup_colorsfalseâ–ş
â—„cleanup_pixels_threshold0.020â–ş
â—„ditherâ–ľâ–ş
Categoryimage/PixelArt🕹️

Inputs (22)

NameTypeDefaultDescription
imagesIMAGE—
paletteCOMBOGAMEBOY2 options: NES, GAMEBOY
resize_wINT5120–2048—
resize_hINT5120–2048—
resize_typeCOMBOcontain3 options: contain, fit, stretch
pixelizeCOMBOImage.quantize3 options: Image.quantize, Grid.pixelate, NP.quantize
grid_pixelate_grid_scan_sizeINT21–32—
reduce_colors_before_palette_swapBOOLEANfalse—
reduce_colors_methodCOMBOImage.quantize4 options: Image.quantize, OpenCV.kmeans.reduce, Pycluster.kmeans.reduce, Pycluster.kmedians.reduce
reduce_colors_max_colorsINT1281–256—
apply_pixeldetector_max_colorsBOOLEANtrue—
image_quantize_reduce_methodCOMBOMAXCOVERAGE3 options: MAXCOVERAGE, MEDIANCUT, FASTOCTREE
opencv_settingsSTRINGOpenCV.kmeans: only when reducing is enabled. RANDOM_CENTERS: Fast but doesn't guarantee same labels for the same image. PP_CENTERS: Slow but will yield optimum and consistent results for same input image. attempts: to run criteria_max_iterations so it gets the best labels. Increasing this value will slow down the runtime a lot, but improves the colors! —
opencv_kmeans_centersCOMBORANDOM_CENTERS2 options: RANDOM_CENTERS, PP_CENTERS
opencv_kmeans_attemptsINT101–150—
opencv_criteria_max_iterationsINT101–150—
pycluster_kmeans_metricsCOMBOEUCLIDEAN_SQUARE6 options: EUCLIDEAN, EUCLIDEAN_SQUARE, MANHATTAN, CHEBYSHEV, CANBERRA, CHI_SQUARE
cleanupSTRINGClean up colors: Iterate and eliminate pixels while there was none left covering less than the 'cleanup_pixels_threshold' of the image. Optionally, enable the 'reduce colors' option, which runs before this cleanup. Good cleanup_threshold values: between .01 & .05—
cleanup_colorsBOOLEANfalse—
cleanup_pixels_thresholdFLOAT0.0200.001–1—
ditherCOMBO6 options: none, floyd-steinberg, bayer-2, bayer-4, bayer-8, bayer-16
paletteListoptLIST—

Outputs (1)

NameTypeDescription
IMAGEIMAGE—