ComfyUI Node

PixelIt 🎨

Turn any image into crisp pixel art (or undo someone else's attempt)

By ARZUMATA·Created 2 years ago·Updated 11 months ago· 1
PixelIt 🎨
  • image
  • IMAGE
â—„downscale_ratio8â–º
â—„target_block_size_resizefalseâ–º
â—„target_block_size8â–º
â—„auto_collapse_blocksfalseâ–º
â—„compensate_collapsefalseâ–º
â—„block_detection_tolerance15.0â–º
â—„detect_jpgtrueâ–º
â—„gridfalseâ–º
â—„grid_alpha255â–º
â—„reduce_colorsfalseâ–º
â—„colors32â–º
â—„convert_grayscalefalseâ–º
â—„convert_palettefalseâ–º
â—„palette_presetnoneâ–º

PixelIt is the ComfyUI port of giventofly's pixelit, the little browser tool pixel-art fans have been feeding photos into for years. You drop in an image, and it comes out the other end as blocky, color-limited, grid-friendly pixel art. The node lives in one pack - ComfyUI-ARZUMATA-PixelIt - and the author added a bunch of extras "for my needs," which is your clue to how the input list looks: more switches than a cockpit, most of which you'll never touch.

Why reach for it? It's a niche stylization node, not a workflow staple. It earns its keep in two places. First, classic stylization - feed it a render or photo and make it look like a game sprite. Second, and more interesting, it reconstructs pixel art: generate pixel art, upscale it, watch it go blurry, then let PixelIt detect the original grid and rebuild the clean low-res image. That second trick is why you'd pick this over the half-dozen pixel-art filters that just downscale and call it a day.

How it works

The pipeline order matters, because it explains the input weirdness. For each image in the batch:

  1. Collapse - if enabled, it detects the block size (scanning candidates like 8, 16, 32, 4, … across a 5×5 grid and scoring how many blocks are uniform), crops to a divisible size, then downsamples each block to its top-left pixel using GPU-accelerated torch ops. This is the "undo an upscale" step.
  2. Shrink - nearest-neighbor downscale by downscale_ratio (default 8 → 1/8 size).
  3. Color pass - optional grayscale, median-cut color reduction, or remapping to a fixed palette.
  4. Re-block - each pixel becomes an N×N block (target_block_size, default 8) via tensor repeat-interleave, so it's fast and crisp.
  5. Grid - optional overlay lines at block boundaries.

Note the balance: it shrinks by downscale_ratio in step 2 and re-expands by target_block_size in step 4. Defaults (8 and 8) cancel out, so output size ≈ input size. If your result comes out tiny or enormous, one of those two is off - that's the single most common "why is this broken" moment.

The inputs that matter

Most of the 15 inputs are boolean toggles with safe defaults, so really you set three things:

  • downscale_ratio (1–256, default 8) - the big pixel size. Higher = chunkier, fewer blocks across the frame.
  • reduce_colors + colors (1–256, default 32) - quantization for that flat game-palette look. Floyd-Steinberg dithering keeps it visually smooth.
  • convert_palette + palette_preset - 38 curated palettes that map every pixel to its nearest palette color via Euclidean distance. This is the "instantly looks like a retro game" button; none skips it.

For the recovery workflow, flip target_block_size_resize on with detect_jpg left at its default true - the node then checks for JPEG 8×8 blocking artifacts and auto-raises the collapse tolerance and applies a light median denoise, which is exactly what you want after a compressed upscale. block_detection_tolerance (0–50, default 15) tunes how strict "uniform block" is; if collapse is mangling a clean image, drop it.

One quirk worth knowing, from the source: auto_collapse_blocks is effectively decorative in the shipped code - collapse actually runs whenever target_block_size_resize is on, regardless of the toggle. So don't panic when enabling the resize switch starts de-pixelating things; that's intended behavior, badly labeled. It's a hobby pack, not a polished SDK.

Output: a single IMAGE tensor - wire it to a Save Image node, or back into img2img / an upscaler for a stylized pass. It handles batches fine (loops over each image), so a Batch of frames pixelates together.

Installing it

ComfyUI Manager: search "ComfyUI-ARZUMATA-PixelIt" and hit install. Or the manual way:

cd ComfyUI/custom_nodes
git clone https://github.com/ARZUMATA/ComfyUI-ARZUMATA-PixelIt

Restart ComfyUI. That's the whole install - there's no requirements.txt to fight with, no model download, no API key. It only needs torch, PIL, and numpy, which ComfyUI already ships. That "clone https://github.com/your-repo-url.git" line in the README is a placeholder; use the real URL above.

Troubleshooting

  • Output blurry instead of blocky - nearest-neighbor downscale is the whole trick; for crisp blocks, drop downscale_ratio and let target_block_size set the size.
  • Collapse wrecking a normal photo - turn target_block_size_resize off. Block detection is tuned for pixel art; a photograph just gets cropped and mangled.
  • JPG-heavy source looks dirty - that's what detect_jpg is for; keep it on.
  • It looks… bad - the presets are opinionated ("Vivid Neon," "Byzantine Rose" aren't everyone's palette), so if the default aesthetic misses, use reduce_colors with your own colors count instead.

Be aware this pack is tiny - near-zero community footprint, effectively one author scratching their own itch. The core is solid and dependency-free, but don't expect frequent updates. Still, for a two-line clone it's the most complete pixel-art utility in the graph, and the block-recovery feature genuinely isn't available anywhere else as a single node.

Categorypixelit

Inputs (15)

NameTypeDefaultDescription
imageIMAGE—
downscale_ratioINT81–256—
target_block_size_resizeBOOLEANfalse—
target_block_sizeINT81–256—
auto_collapse_blocksBOOLEANfalse—
compensate_collapseBOOLEANfalse—
block_detection_toleranceFLOAT15.00–50—
detect_jpgBOOLEANtrue—
gridBOOLEANfalse—
grid_alphaINT2550–255—
reduce_colorsBOOLEANfalse—
colorsINT321–256—
convert_grayscaleBOOLEANfalse—
convert_paletteBOOLEANfalse—
palette_presetCOMBOnone38 options: none, Muted Twilight, Earthy Tones, Coastal Dawn, Vivid Neon, Desert Sunset, +32

Outputs (1)

NameTypeDescription
IMAGEIMAGE—