PixelIt π¨
Turn any image into crisp pixel art (or undo someone else's attempt)
- image
- IMAGE
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:
- 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.
- Shrink - nearest-neighbor downscale by
downscale_ratio(default 8 β 1/8 size). - Color pass - optional grayscale, median-cut color reduction, or remapping to a fixed palette.
- Re-block - each pixel becomes an NΓN block (
target_block_size, default 8) via tensor repeat-interleave, so it's fast and crisp. - 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;noneskips 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_ratioand lettarget_block_sizeset the size. - Collapse wrecking a normal photo - turn
target_block_size_resizeoff. Block detection is tuned for pixel art; a photograph just gets cropped and mangled. - JPG-heavy source looks dirty - that's what
detect_jpgis 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_colorswith your owncolorscount 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.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | β | |
| downscale_ratio | INT | 81β256 | β |
| target_block_size_resize | BOOLEAN | false | β |
| target_block_size | INT | 81β256 | β |
| auto_collapse_blocks | BOOLEAN | false | β |
| compensate_collapse | BOOLEAN | false | β |
| block_detection_tolerance | FLOAT | 15.00β50 | β |
| detect_jpg | BOOLEAN | true | β |
| grid | BOOLEAN | false | β |
| grid_alpha | INT | 2550β255 | β |
| reduce_colors | BOOLEAN | false | β |
| colors | INT | 321β256 | β |
| convert_grayscale | BOOLEAN | false | β |
| convert_palette | BOOLEAN | false | β |
| palette_preset | COMBO | none | 38 options: none, Muted Twilight, Earthy Tones, Coastal Dawn, Vivid Neon, Desert Sunset, +32 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |