ComfyUI Node

Pixelate

Honest pixel art from AI output, not fake-looking pixels

By criskb·Created 7 months ago·Updated 5 months ago· 0
Pixelate
  • image
  • mask
  • image
  • mask
  • pixelate_info
settings_json{"pixel_size_x":8,"pixel_size_y":8,"downsample_mode":"box","upscale_mode":"nearest","cell_blend":0.0,"color_levels":0,"grid_strength":0.0,"grid_width":1,"mask_feather":12.0,"invert_mask":false}

Diffusion models are famously bad at pixel art - they produce something that looks like pixel art from a distance and falls apart up close, with muddy anti-aliased edges and palettes that never quite commit. The community's correct position, documented in post-processing.md, is that real pixel art is a post-process, not a prompt. x1Pixelate is that post-process: it takes your render and turns it into clean, intentional pixels with the kind of hard-edged cells a pixel artist would actually recognize.

It lives in MKRShift Nodes' VFX/Stylize branch. Where a naive "pixelate" filter just downsamples and smears, this one gives you the controls to make the result look deliberate.

How it works

The core is a downsample-then-upsample: crush the image to pixel_size_x × pixel_size_y cells, then blow it back up with a chosen filter. The details are where it stops being a toy filter:

  • pixel_size_x / pixel_size_y (default 8×8) - the cell size in source pixels. This is your "how chunky" knob
  • downsample_mode - how cells are averaged (box default, plus filter options)
  • upscale_mode - nearest is the one that gives you hard, clean pixels instead of soft interpolation
  • cell_blend - a touch of blend between cells when you want it softer
  • color_levels - quantize each cell to a limited number of levels. This is the "limited palette" control that separates deliberate pixel art from "a blurry low-res version of my photo"
  • grid_strength / grid_width - draw the cell grid back in, which is how you get the classic visible-pixel look

All in a settings_json string, the pack's house style. color_levels is the sleeper: set it to 4-8 with nearest upscaling and the output starts reading as designed pixel art rather than a mosaic of your render.

Inputs and outputs

Required: image and settings_json. Optional: mask for pixelating only part of the frame - the classic "pixelate the face in the crowd" move, which is also how you'd pixelate a TV screen or a license plate.

  • image - the pixelated result
  • mask - the effective influence mask
  • pixelate_info - summary string of resolved settings

Where it slots in

Honestly, this is a stylize node with a niche but real audience: sprite-sheet work, UI mockups, retro pieces, and content-safety pixelation. The pack's pixel-art family (MKRPixelPaletteReduce, MKRSpriteSheetExtract) surrounds it with the palette-reduction and sheet-tiling steps you'd want for a real asset pipeline. The honest framing: if you want authentic pixel art, the community's answer is "make it yourself or post-process a render," and x1Pixelate is a much better post-process than the model's attempt.

Installing it

ComfyUI Manager (search "MKRShift Nodes") or:

cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes

Restart, done. No requirements, no models, no ffmpeg. The pack is a big install for one stylize node - if pixel art isn't a regular job for you, this is the weakest reason in the pack to install it. It does its one job well, but it's not the headliner.

Where people get burned

The classic complaint is "my pixelate looks soft." That's upscale_mode not on nearest, or cell_blend above zero - either one reintroduces interpolation that defeats the whole point. And if your cells look irregular, remember color_levels only quantizes color, not geometry; uneven-looking pixels usually mean the source render was already noisy, so feed it a cleaner image first.

CategoryMKRShift Nodes/VFX/Stylize

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
settings_jsonSTRING{"pixel_size_x":8,"pixel_size_y":8,"downsample_mode":"box","upscale_mode":"nearest","cell_blend":0.0,"color_levels":0,"grid_strength":0.0,"grid_width":1,"mask_feather":12.0,"invert_mask":false}
maskoptMASK

Outputs (3)

NameTypeDescription
imageIMAGE
maskMASK
pixelate_infoSTRING