Retro Pixel-Matrix Dither ๐พ
Make your ComfyUI output look like it shipped on a C64 in 1985
- image
- image
- patterns_preview
ComfyUI is great at making images that look like pixel art from a thumbnail. Zoom in and they fall apart - off-grid pixels, soft edges, three hundred colors where a real retro machine had sixteen. That's not a bug in your prompt; it's how diffusion fundamentally works. This node is the fix. It's the palette-quantize-and-dither step of the classic pixel-art pipeline, wrapped up as a single node, and it turns your normal image into something that genuinely looks like it could have come out of an Amiga or a C64.
The pack is called Retro Pixel-Matrix Dither ๐พ, and it's a one-trick pony in the best way: one node class, no models, no API keys, no GPU load. It's also brand new (first release July 2026), so there's no community lore around it yet - what follows is grounded in the code and the README, not forum hearsay.
How it actually works
Under the hood it's a three-stage pipeline, and understanding it makes the sliders make sense. First it builds a virtual palette from the hardware preset you pick: for every pair of colors that passes a perceptual distance test, it generates three in-between shades (25/50/75% mixes). A 16-color palette becomes roughly 300 candidate colors.
Then it decides which mixes are allowed. The "cone-model clashing protection" is the clever bit: it computes hue-saturation distance on a cone and luminance difference separately, then applies penalties weighted by color_weight and brightness_weight. That's what stops the classic dithering sin of mixing blue and yellow into a muddy high-contrast stipple, while still letting similar tones blend smoothly. Finally, an edge-detection pass (a simple gradient) multiplies the penalty on strong outlines by edge_protection, so borders stay solid instead of dissolving into noise. Each pixel is then quantized to the nearest allowed candidate - perceptually weighted, so it's RGB distance by luminance, not raw Euclidean - and rendered with a 2ร2 Bayer ordered-dither matrix, which is what produces that regular, authentic stipple texture.
The author is upfront that this is a human-AI collaboration: algorithm designed by them, code by Gemini. For a single-file node the code is actually readable and well-commented, which matters when you're trying to figure out why a mix got rejected.
The inputs that matter
There are seven inputs, but a beginner really touches three:
palette_preset- the hardware you're cosplaying as:c64,atari,amiga,ega(default),ega-mod,gameboy,cga. GameBoy and CGA are only 4 colors, so expect aggressive posterization there.max_mix_rgb_distance(default 105, 0โ255) - how far apart two palette colors can be and still be allowed to mix. Crank it toward 255 and every mix is allowed, which means noise. Lower it and you get cleaner but harsher output.edge_protection(default 0.5) - higher keeps outlines crisp.
color_weight and brightness_weight are the clashing penalties; the defaults (20/260) are the tuned sweet spot, so leave them alone until you know what you're doing. custom_palette takes hex or RGB values one per line, and only overrides the preset if you've actually changed the text - pasting the default does nothing. patterns_preview is the diagnostic: set it to enable and the second output shows a grid of every allowed 2ร2 pattern, with a grayscale background shading the reliability score. Dark cell = the algorithm is suppressing that combo.
The node has two outputs: image (your dithered result) and patterns_preview. One trap: when patterns_preview is disable, the second output is just a 16ร16 black tensor. If you wire it into a preview and see black, that's working as intended - flip the switch on.
Installing it
No models, no heavy deps - the whole thing is numpy + pillow, which ComfyUI already has. Via Manager: search "Retro Pixel-Matrix Dither". Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/vitacon/ComfyUI-Retro-Pixel-Matrix-Dither
Restart ComfyUI. It'll print a loading banner so you know it registered.
Where people get burned
The big one: this node doesn't downscale to a pixel grid. It keeps your full resolution and dithers it, so you still need the other two pipeline steps - integer downscale to a real grid, then nearest-neighbor upscale for display (never a smooth upscaler, that destroys the pixels). Feed it the output of a proper downscale and this node shines.
Want to tune presets without re-running ComfyUI? The repo ships color-tuner.html, a browser tool with sliders that matches the Python backend (the v1.2.0 update synced them), and there's a CLI: python retro_matrix_dither.py photo.png --pal gameboy. For everything else - period-correct palettes and why diffusion can't fake pixel art - the ComfyUI community consensus is that a deterministic post-process is the only honest way, and this node is exactly that.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | โ | |
| palette_preset | COMBO | ega | 7 options: c64, atari, amiga, ega, ega-mod, gameboy, +1 |
| max_mix_rgb_distance | INT | 1050โ255 | โ |
| edge_protection | FLOAT | 0.50โ20 | โ |
| custom_palette | STRING | #000000 #00001E #002A00 #002A2A #302010 #2A002A #2A1500 #2A2A2A #151515 #15153F #153F15 #3F231E #2A1515 #3F153F #3F3F15 #3F3F3F | โ |
| patterns_preview | COMBO | disable | 2 options: disable, enable |
| color_weight | INT | 200โ300 | โ |
| brightness_weight | INT | 2600โ300 | โ |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | โ |
| patterns_preview | IMAGE | โ |