8-Bit / Pixelate | GlitchNodes
Real 8-bit palettes, not just chunky pixels
- IMAGE
- image
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 Paletteuses the historical palettes;Adaptive K-Meansanalyzes your image and builds an optimal palette ofk_colorscolors (2–256). For non-retro content, K-Means usually looks better. - dithering -
None,Ordered, orFloyd-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_paletteis "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.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| IMAGE | IMAGE | — | |
| pixel_size | INT | 41–256 | — |
| quant_mode | COMBO | 2 options: Fixed Palette, Adaptive K-Means | |
| fixed_palette | COMBO | 14 options: PICO-8, GameBoy, NES, C64, ZX Spectrum, Apple II, +8 | |
| custom_palette_hex | STRING | #000000,#555555,#AAAAAA,#FFFFFF | — |
| k_colors | INT | 82–256 | — |
| dithering | COMBO | 3 options: None, Ordered, Floyd-Steinberg | |
| ordered_size | INT | 42–8 | — |
| posterize_bits | INT | 81–8 | — |
| gamma | FLOAT | 1.000.1–3 | — |
| seedopt | INT | 00–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |