ComfyUI Node

Pixel Art

A node for applying pixel art effects to an image. This is very customizable, with multiple controls like number of colors to use, dither mode, dither matrix size, palette mode, matrix threshold and expanding to negative values too. If you provide a palette it expects each pixel to be a unique color so say 4x1 or 2x2 are fine. scale = what to divide the image size by, higher values means bigger pixels num_colors = how many colors the palette should have, some palette modes may not use exactly the number if its really high saturation = pre add more saturation to the image before making the palette dither = dither mode for quantization matrix_size = size of the bayer matrix for dithering palette_mode = mode for creating the palette of the image dither_strength = how much dither to apply matrix_expand_negative = expand the matrix_threshold into the negative space, good for higher num_colors floyd_dither_serpentine = serpentine the dither or not floyd_dither_threshold_jitter = jitter the dither or not palette_filepath = path to any .ase, .aco or .act swatch file to use as the palette

By TrophiHunter·Created about a year ago·Updated about a year ago· 4
Pixel Art
  • image
  • palette
  • IMAGE
scale2
num_colors4
saturation1.00
dithernone
matrix_size4
palette_modenone
dither_strength1.00
matrix_expand_negativetrue
floyd_dither_serpentinefalse
floyd_dither_threshold_jitterfalse
palette_filepath
CategoryTrophiHunter/Photography

Inputs (13)

NameTypeDefaultDescription
imageIMAGE
scaleINT21–128
num_colorsINT41–256
saturationFLOAT1.000.8–3
ditherCOMBOnone5 options: none, floyd, noise, ordered, pattern
matrix_sizeCOMBO45 options: 2, 4, 8, 16, 32
palette_modeCOMBOnone6 options: none, adaptive, median_cut, perceptual, uniform, consolidate
dither_strengthFLOAT1.000–10
matrix_expand_negativeBOOLEANtrue
floyd_dither_serpentineBOOLEANfalse
floyd_dither_threshold_jitterBOOLEANfalse
palette_filepathSTRING
paletteoptIMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE