Nodes/Link Comfy Nodes/Convert to Pixel Art
ComfyUI Node

Convert to Pixel Art

Quantize and block your frames into retro pixel art

By Mister-Link·Created 9 months ago·Updated 23 days ago· 0
Convert to Pixel Art
  • frames
  • alpha
  • pixelated_frames
  • alpha
kernel_size9
pixel_size11
num_bins10
alpha_threshold0.58

Note the naming carefully: this pack actually ships two pixel-art nodes, Pixelate and Convert to Pixel Art, and they're not the same thing. Pixelate is the fancier one, with dithering and hex palette remapping. This node - ConvertToPixelArt - is the simpler sibling: pixelation through color quantization, no dithering or palette-file support. If you just want a clean, chunky, limited-palette look without fussing over a custom palette, this is the one to reach for.

How it works

It works a batch of frames down in two moves at once: it groups pixels into blocks and reduces the number of distinct colors it's willing to use, which together produce the classic low-res, limited-palette pixel-art effect. It's built to run across a whole image batch, not just a single frame, so it's a natural fit if you're turning generated animation into a sprite-style output.

The inputs and outputs that matter

  • frames (IMAGE, required) - the batch to convert.
  • kernel_size (INT, default 9, 1–128) - the sampling block used to work out each pixel-art block's representative color. Bigger values smooth over more local detail before quantizing.
  • pixel_size (INT, default 11, 1–128) - this is the knob that actually controls how chunky the final result looks. Push it up for blockier, more retro output; keep it small for a subtler effect.
  • num_bins (INT, default 10, 1–256) - how constrained the resulting color palette is. Lower numbers mean a starker, more limited-palette look; higher numbers keep more of the original color range.
  • alpha_threshold (FLOAT, default 0.58, 0–1) - only relevant if you feed the optional alpha mask; it's the cutoff for treating a block as transparent versus opaque.

The two outputs mirror the inputs: pixelated_frames (IMAGE) and alpha (MASK) - the alpha comes back through processed and aligned with the pixelated output, useful if you're building sprites that need to stay transparent outside the character.

How to install it

ComfyUI Manager: search "Link Comfy Nodes," install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/Mister-Link/link-comfy-nodes
pip install -r link-comfy-nodes/requirements.txt

Restart ComfyUI.

Common issues & troubleshooting

Result looks muddy instead of crisp pixel art. That's almost always num_bins set too high for the effect you want - a large bin count keeps too much of the original gradient, which reads as "slightly blurry" rather than "pixel art." Drop it toward the lower end of its range and the blocky, limited-palette look shows up fast.

Pixel blocks look too subtle, or too extreme. pixel_size is the dial for that, not kernel_size - it's easy to nudge the wrong parameter and wonder why nothing visibly changed. If you've been adjusting kernel_size for chunkiness and getting nowhere, that's the mix-up.

Alpha edges look wrong on transparent PNGs. alpha_threshold defaults to 0.58, which is a mid-range cutoff; if your source alpha is mostly near-fully-opaque or near-fully-transparent with a soft edge, you may need to nudge that threshold up or down to get a clean silhouette rather than a ragged or overly-aggressive cutoff at the edges.

Categoryimage/transform

Inputs (6)

NameTypeDefaultDescription
framesIMAGE
kernel_sizeINT91–128
pixel_sizeINT111–128
num_binsINT101–256
alpha_thresholdFLOAT0.580–1
alphaoptMASK

Outputs (2)

NameTypeDescription
pixelated_framesIMAGE
alphaMASK