π― YFG PixelArt
The two-line resize that turns renders into pixel art
- image
- IMAGE
Pixel art is one of those effects that looks like it should be hard and is actually a party trick: take an image, shrink it way down, blow it back up with nearest-neighbor sampling, and the chunky blocky look appears by itself. That's exactly what this node does, and it's the rare ComfyUI effect node where you can understand 100% of the mechanism in one sentence.
The "YFG PixelArt" node (from the gonzalu/ComfyUI_YFG_Comical pack, adapted from XSS's original Mosaic code) takes an IMAGE in and returns a pixelated IMAGE out. Under the hood it's two torch.nn.functional.interpolate calls: a downscale to your chosen pixel grid, then an upscale back to the original resolution using nearest-neighbor. Done. The blockiness is just information loss made visible.
The two inputs that matter
pixel_size(1β512, default 4) - how chunky the pixels get. This is the real "pixel size" of the result: 4 gives a subtle texture, 16+ is aggressive, and anything past 32 starts to look like a mosaic of a photograph. Push it and preview.interpolation_method- which resampling runs on the downscale:nearest,bilinear,bicubic,area, ornearest-exact.nearest(the default) gives the crispest, most authentic pixel-art look.areaaverages blocks and gives a smoother, antialiased feel. Everything exceptnearestblurs slightly, which some people prefer - but if you want true retro blocks, leave it onnearest.
The output is the same resolution as the input, so you can chain this straight into a SaveImage or an upscale without thinking about sizes.
When to use it
It's a fun, instant stylization - game-asset mockups, retro profile pictures, thumbnail art. It's also a genuinely useful analysis tool: pixelating an image before inpainting or compositing can hide generation artifacts in areas where you don't want them to be visible. But it's a one-trick node, and the trick is well-trodden - ComfyUI ships similar downscale-then-nearest workflows, and the "Nearest" ImageScale mode does most of this. The convenience is that it's one node with a single pixel-size knob instead of a two-node dance.
Installing
Part of the pack: ComfyUI Manager β search "YFG Comical", or
cd ComfyUI/custom_nodes
git clone https://github.com/gonzalu/ComfyUI_YFG_Comical
Restart ComfyUI. This node needs only torch + PIL, so it's the easiest piece of the pack to get running - no model downloads, no API keys. (The pack-wide cv2/matplotlib import issue can still take the whole pack down; if so, pip install opencv-python matplotlib.)
The honest take
For a quick stylized effect it's perfect - zero setup, one knob, instant result. Don't expect it to do anything cleverer than block-ify an image, because it doesn't need to. If you're after authentic pixel-art generation (the model kind, with palettes and dithering), that's a prompt problem, not a node problem - this is the cheap and cheerful version.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | β | |
| pixel_size | INT | 41β512 | β |
| interpolation_method | COMBO | nearest | 5 options: nearest, bilinear, bicubic, area, nearest-exact |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |