Pixel Art Preview
The Pixel Art Preview magnifier
- images
ComfyUI's default image preview draws with smoothing, and for pixel art that's close to sabotage. A 32×32 sprite rendered with bilinear scaling looks like a smudge, so you end up squinting at a thumbnail that hides the one thing you actually need to check - whether each pixel landed where it should. The Pixel Art Preview node from the ComfyUI_Pixel_Snapper pack exists to fix exactly that. It draws your image with true nearest-neighbor rendering, so every pixel is a hard-edged square, and it wraps the display in a magnifier lens that follows your cursor. Hover over a face and you're looking at the real pixels, not a guess.
How it works. The node itself is an output node: it saves the incoming images to ComfyUI's temp directory and sends the file paths plus the magnifier, zoom, and lens_size values to the browser. The heavy lifting lives in a small front-end extension (web/pixelart_preview.js) that draws the image with image-rendering: pixelated - the crispness is a browser property, not something the GPU does - and overlays a circular lens that blows up the region under your cursor by the zoom factor. Everything happens in the browser, so it costs nothing at generation time beyond a temp-file save. The tradeoff of that design is that you must let the widget load, hence the hard-refresh ritual below.
The inputs you'll touch. Three widgets plus the image feed, and the defaults are sane:
images- the IMAGE you want to inspect: the Pixel Snapper engine's output, or the Resizer's upscaled result.magnifier- on by default; flip it off for a plain crisp preview if the lens gets in the way.zoom- magnification, 2–32×, default 6. At 6× you're looking at individual pixels on most sprites.lens_size- the lens diameter in pixels (40–400, default 140).
That's the whole interface. You won't spend much time here after the first run.
Installing it. It ships in the ComfyUI_Pixel_Snapper pack. Easiest path is ComfyUI Manager - search for "ComfyUI_Pixel_Snapper" and install, or clone it manually:
cd ComfyUI/custom_nodes
git clone https://github.com/HexaDucket/ComfyUI_Pixel_Snapper
Then restart ComfyUI. No extra Python dependencies - the pack uses only torch, numpy, and Pillow, which ship with ComfyUI.
The gotcha that will bite you once. Because the preview is a browser-side widget, if ComfyUI was already running when you installed the pack, the old blurry preview can stick around even after restart. Hard-refresh the browser with Ctrl+F5 (Cmd+Shift+R on macOS) so the widget JavaScript actually loads. This is the top support question for the pack, and it's a 5-second fix. Two more things worth knowing: it's an output node, so nothing passes through it - put it at the end of the chain in place of Preview Image - and although the pack's snapping engine is Windows-only (more on that in the Resizer article), this node is pure Python plus browser code, so it runs fine on any OS once the pack is installed.
The one genuinely fiddly part of pixel-art work is judging the result, and this node quietly removes that friction. Wire it to the end of your pipeline and you'll stop re-exporting sprites just to see if they're clean.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| magnifier | BOOLEAN | true | — |
| zoom | INT | 62–32 | — |
| lens_size | INT | 14040–400 | — |
Outputs (0)
No outputs