ComfyUI Node Runs on cloud

Image Pixelate

Turn a render into pixel art

By WASasquatch·Created 3 years ago·Updated about a year ago· 1,812
Image Pixelate

      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.

      Categoryx

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs