Nodes/GlitchNodes/8-Bit / Pixelate | GlitchNodes
ComfyUI Node

8-Bit / Pixelate | GlitchNodes

Real 8-bit palettes, not just chunky pixels

By pxl-pshr·Created 2 years ago·Updated 3 months ago· 73
8-Bit / Pixelate | GlitchNodes
  • IMAGE
  • image
pixel_size4
quant_mode
fixed_palette
custom_palette_hex#000000,#555555,#AAAAAA,#FFFFFF
k_colors8
dithering
ordered_size4
posterize_bits8
gamma1.00
seed0

Pixel8Bit is the GlitchNodes node you'll actually keep. Slap any image through it and you get that chunky, period-authentic 8-bit look - the kind that reads as "Game Boy" or "C64" instead of "I ran a pixelate filter." It's the most feature-complete node in the pack, and the one worth reaching for when a generated image needs to sit in a retro frame or a fake cartridge box art.

Most pixelation nodes just downscale and call it a day. Pixel8Bit does the whole pipeline: it downsamples to a coarse grid, quantizes colors down to a small palette, and optionally dithers to hide the banding. What makes it special is the palettes - it ships with period-accurate historical sets like PICO-8, Game Boy, NES, C64, ZX Spectrum, EGA-16, and VGA-256, all hardcoded in the source. Flip fixed_palette and the whole color grading changes to whatever that machine could actually display. Want a purist look? Leave dithering on None for hard color transitions. Want something closer to how the hardware actually rendered gradients? Floyd-Steinberg error diffusion, or Ordered with a Bayer matrix (2x2, 4x4, or 8x8 via ordered_size).

The inputs that matter

  • pixel_size (1–256, default 4) - how big the pixels get. 4 is subtle; 16+ is aggressively chunky.
  • quant_mode - Fixed Palette uses the historical palettes; Adaptive K-Means analyzes your image and builds an optimal palette of k_colors colors (2–256). For non-retro content, K-Means usually looks better.
  • dithering - None, Ordered, or Floyd-Steinberg. This is where the "authentic" feel comes from.
  • posterize_bits (1–8, default 8) - drops color precision before quantization; lower values flatten the image further.
  • gamma (0.1–3.0) - brightness curve applied before processing. Handy for dark images that turn to mush when quantized.
  • custom_palette_hex - comma-separated hex list used when fixed_palette is "Custom". That's how you do brand colors or your own 16-color set.

There's also an optional seed so K-Means results are reproducible. Output is a plain image (IMAGE) - wire it to PreviewImage, SaveImage, or straight into a video encoder.

Installing it

It ships in the GlitchNodes pack, so you install the pack, not this node alone. Easiest is ComfyUI Manager → Install Custom Nodes → search "GlitchNodes". Or the manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/pxl-pshr/GlitchNodes
# restart ComfyUI

Dependencies are numpy, torch, Pillow, opencv-python, and scipy - Manager installs them automatically. No model files to download; everything runs on CPU if it has to.

Gotchas

The whole pack is "highly experimental and may break or even error" per the README, and Pixel8Bit is no exception - K-Means on a large batch can crawl, so test on a single frame first. One easy trap: if you set posterize_bits low and crank pixel_size, you can end up with a flat mess rather than a retro look. Start at the defaults, then push pixel_size up and let the dithering carry the texture. It's the difference between pixel art and a smudge.

CategoryGlitchNodes

Inputs (11)

NameTypeDefaultDescription
IMAGEIMAGE
pixel_sizeINT41–256
quant_modeCOMBO2 options: Fixed Palette, Adaptive K-Means
fixed_paletteCOMBO14 options: PICO-8, GameBoy, NES, C64, ZX Spectrum, Apple II, +8
custom_palette_hexSTRING#000000,#555555,#AAAAAA,#FFFFFF
k_colorsINT82–256
ditheringCOMBO3 options: None, Ordered, Floyd-Steinberg
ordered_sizeINT42–8
posterize_bitsINT81–8
gammaFLOAT1.000.1–3
seedoptINT00–18446744073709550000

Outputs (1)

NameTypeDescription
imageIMAGE