Nodes/ComfyUI_Pixel_Snapper/Pixel Art Resizer
ComfyUI Node

Pixel Art Resizer

Pixel Art Resizer

By HexaDucket·Created 2 months ago·Updated 2 months ago· 6
Pixel Art Resizer
  • image
  • image
modescale_factor
scale_factor2.00
width128
height128
interpolationnearest
keep_aspecttrue

Your snapping engine just collapsed a photo into a 48×48 sprite, and now you need it at 384×384 so it's actually usable. Reach for the Pixel Art Resizer. It does one job - resizing images without destroying crisp pixel edges - and it refuses to get clever about it. There's no neural network in here, no invented detail, just a plain resize wrapped in a ComfyUI node. That's the point, so let's be clear about where it sits in the upscaler hierarchy: this is the "more pixels" category, not the "more detail" one. ESRGAN, SeedVR2, and friends are generative and will happily invent texture that was never there; this node adds nothing. For pixel art, that's a feature.

How it works. It's Pillow's Image.resize under the hood, with the interpolation filter exposed as a dropdown. You're picking which resampling filter runs - nothing else happens. Nearest-neighbor keeps each pixel a hard-edged square (the right call for upscaling sprites), while the smooth filters blur on purpose, which is only sensible when you're shrinking something down toward a pixel-art resolution.

The inputs that matter. Three, really:

  • mode - scale_factor (multiply by scale_factor) or target_size (fit inside width × height). You'll live in scale_factor mode 90% of the time.
  • scale_factor - 0.05–64, default 2.0. Stick to whole numbers (2, 4, 8) when upscaling: a 3.5× nearest upscale produces pixels of uneven widths, and that's visible. 4× is the sweet spot for game-ready sprites.
  • interpolation - nearest (default), box, bilinear, hamming, bicubic, lanczos. Use nearest to enlarge; use box to shrink a big image down to pixel-art resolution. The default is right.

width and height (with keep_aspect, on by default) only matter in target_size mode - it fits the image inside the box, letterbox-style, scaling by whichever axis needs the smaller factor.

What comes out. A single image output, standard IMAGE type, so it wires anywhere a tensor is expected - into the Pixel Art Preview node, a Save Image node, or a later stage of your pipeline. It handles batches too, forcing every frame to a consistent size so the stack doesn't explode.

Installing it. Same pack as the engine and the preview: ComfyUI Manager, searching "ComfyUI_Pixel_Snapper", or:

cd ComfyUI/custom_nodes
git clone https://github.com/HexaDucket/ComfyUI_Pixel_Snapper

Restart ComfyUI after. No extra dependencies beyond the torch/numpy/Pillow ComfyUI already ships.

The traps. The big one is reaching for lanczos or bicubic to "smooth" an upscale - that smears your crisp edges and you'll spend an hour convincing yourself it looks fine. It doesn't. Nearest is the entire point. Second, remember this node doesn't know or care about the Windows-only .exe that powers the snapping engine - this one is pure Python, so if you're on Linux or macOS and the engine node won't run, the Resizer still will. And the usual custom-node advice applies: if ComfyUI was running when you installed, restart it (and hard-refresh the browser with Ctrl+F5) before assuming something's broken.

A resize node is unglamorous, and that's the compliment. When the only thing standing between your sprite and a working game is "make it bigger without making it ugly," this is the node you want.

Categoryimage/pixel_art

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
modeCOMBOscale_factor2 options: scale_factor, target_size
scale_factorFLOAT2.000.05–64
widthINT1281–8192
heightINT1281–8192
interpolationCOMBOnearest6 options: nearest, box, bilinear, hamming, bicubic, lanczos
keep_aspectBOOLEANtrue

Outputs (1)

NameTypeDescription
imageIMAGE