Image Pixelate
Turn a render into pixel art
- images
- color_palettes
- images
Image Pixelate does exactly what the name says - turns an image into pixel art. The README's own description is delightfully un-serious: "turn an image into pixel art! Define the max number of colors, the pixelation mode, the random state, and max iterations, and max those sprites shine." Under the enthusiasm it's a real two-part operation: downsample into blocky pixels, and crunch the palette down to a limited set of colors. Both halves matter, because true pixel art isn't just chunky - it's chunky and limited-palette.
Why you'd use it
Because getting a genuine retro/16-bit look out of a diffusion model directly is surprisingly hard - even with a pixel-art LoRA you tend to get "smooth image that vaguely resembles pixels," with anti-aliased edges and hundreds of colors hiding in the gradients. A post-process pixelate cleans that up honestly: it snaps everything to a grid and forces a real limited palette, which is what sells the effect. Generate your image normally, then run it through here to get sprite-sheet-ready output for game art, avatars, or a stylized final.
The settings that matter
Straight from the README, the controls are:
- max number of colors - the palette size. This is the single biggest lever on the look. Low (say 8–16) reads as retro NES/Game Boy; higher keeps more fidelity but looks less "pixel art." This is a color-quantization step, so fewer colors = a more convincingly limited palette.
- pixelation mode - how it blocks the image down.
- random state and max iterations - these feed the color-clustering under the hood (quantizing colors is a clustering problem; the random state makes a given result reproducible, and iterations control how hard the clustering works before it settles).
The output is the pixelated image. In practice you'll fiddle with color count first - it's the one that changes the vibe most - and leave the clustering controls near their defaults unless the palette looks off.
Tips and gotchas
- Resolution sells it or kills it. Pixel art wants to actually be low-resolution. If you pixelate a 2048px image the blocks are tiny and the effect is weak. Consider resizing down (nearest-neighbor, via Image Resize) so the pixels are chunky, then scaling back up with nearest if you need a bigger file that stays crisp.
- Palette first. Get the color count right before worrying about anything else.
- Reproducibility. Keep the random state fixed if you want the same quantized result every run.
Installing it
Part of WAS Node Suite. Install the pack via ComfyUI Manager (search was-node-suite-comfyui, install, restart) or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui
install requirements.txt, restart. No model downloads for this one.
Troubleshooting
The pack-wide issue applies here too: WAS Node Suite has been unmaintained since December 2023, and the whole suite can report "Import Failed" after a ComfyUI update - a dependency-version clash (opencv, usually). Reinstall requirements.txt into the correct venv (activate it, or use install.bat). Some WAS nodes also install a small extra dependency on first run, so the very first pixelate might pause briefly while that resolves - that's expected, not a hang.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | The images to pixelate. Each one is handled on its own. | |
| pixelation_size | FLOAT | 16416–480 | Width in pixels the image is reduced to before being blown back up, which sets how big the blocks look. 16 gives very coarse blocks, 164 a recognisable picture, and 480 a subtle effect. An image already smaller than this is not touched. |
| num_colors | FLOAT | 162–256 | How many colours to keep. 2 gives two-tone, 16 is a classic 8-bit look, and 256 keeps most of the original shading. |
| init_mode | COMBO | How the colour reduction starts. `k-means++` spreads the starting colours apart and usually finds the better palette; `random` is quicker and can miss a colour that covers little of the image; `none` skips the colour reduction altogether and only shrinks the image. | |
| max_iterations | FLOAT | 1001–256 | Refinement passes the colour reduction is allowed. 100 settles almost any picture; 10 stops early and is quicker but coarser; 256 is the most it will spend. Read only when init_mode is not `none`. |
| dither | BOOLEAN | false | `on` scatters the rounding error into neighbouring pixels, which trades flat bands of colour for a fine speckle and makes a small palette look richer; `off` leaves the flat areas flat. |
| dither_mode | COMBO | Which dither to use when dither is on. `FloydSteinberg` gives a fine organic stipple; `Ordered` snaps to a power-of-two number of levels first, giving a coarser, more regular texture. | |
| color_palettesopt | ARRAY | One palette of '#rrggbb' lines per image, as Image Color Palette emits. Connect it to repaint the result in those colours instead of the ones found in the image. Leave it unconnected to keep the image's own colours. | |
| color_palette_modeopt | COMBO | How a pixel is matched to a palette colour. `Perceptual` picks the closest colour as the eye sees it, and is the one to reach for. | |
| reverse_paletteopt | BOOLEAN | false | On flips the palette end to end before matching, which inverts a dark-to-light ramp. `Linear` and `Luminance Ramp` change visibly; the modes that match on colour rather than on position do not. |
| palette_ditheropt | COMBO | How the error left by palette matching is spread, in `Perceptual` mode. `FloydSteinberg` gives an organic stipple; `Bayer` a fixed 8x8 pattern that stays still. | |
| palette_smoothopt | BOOLEAN | true | Whether `Luminance Ramp` blends between neighbouring palette colours. On, the palette reads as a continuous gradient and shading survives the mapping. Off, every pixel snaps to one palette colour, banding the picture into exactly that many tones, which is usually what pixel art wants. |
| palette_blendopt | FLOAT | 1.000–1 | How much of the palette result replaces the colours under it, in the two perceptual modes. 1.0 is the palette alone; lower values let the reduced original show through, which softens a colourised plate back towards its own hues. |
| palette_normalizeopt | BOOLEAN | false | Whether `Luminance Ramp` stretches the palette across each image's darkest and lightest values. Off by default, which reads brightness absolutely and keeps a sequence steady. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | The pixelated images, back at their original size. |