FL Pixel Art
Turn a render into real pixel art
- images
- mask
- palette_image
- IMAGE
Prompting for "pixel art" gets you fake pixel art - an image that looks pixel-ish at a glance but has thousands of colors and soft anti-aliased edges when you zoom in. Real pixel art has a small, deliberate palette and hard chunky pixels. FL_PixelArtShader does the honest conversion: it downsamples your image with nearest-neighbor so the pixels are genuinely blocky, then quantizes the colors down to a limited set, optionally snapping them to a palette you provide. The result actually holds up when you inspect it.
Two operations, and they're independent. Pixel size controls how big the blocks are - the spatial chunkiness. Color depth / palette controls how few colors are used - the thing that gives pixel art its retro, limited-hardware feel. You can crank one without the other, but real pixel-art looks come from doing both: big pixels and a tight palette.
The inputs that matter
You feed images, you get an IMAGE out. The controls:
pixel_size(1–100, default 15) - the size of each output pixel block. Bigger = chunkier, more 8-bit. This is your main knob.color_depth(1–255, default 50) - how many color levels to quantize to. Lower = more limited, more retro. This is the second main knob.palette_image(optional IMAGE) - feed a reference image and it'll extract a palette from it (via K-means) and map your image onto those colors. This is the pro move: hand it a Game Boy screenshot or a favorite sprite sheet and your render adopts that exact palette.palette_colors(2–16, default 16) - how many colors to pull when using a palette image.use_aspect_ratio(default on) - keeps proportions sane while downsampling.mask(optional) - apply the effect only where the mask allows;invertflips it.blend_intensityandenvelope_jsonlet you dial the effect strength or drive it from an external signal.
For a first pass, ignore everything but pixel_size and color_depth. Get the chunk size and palette tightness right, then add a palette image if you want a specific look.
Installing it
Part of ComfyUI_Fill-Nodes. ComfyUI Manager: search Fill-Nodes, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes
then restart ComfyUI. No model download for this one.
Getting a good result
The mistake is a huge pixel_size with an untouched color_depth - you get big blocks but hundreds of colors, which reads as "blurry," not "pixel art." Pull the color depth down alongside the pixel size; the limited palette is half the effect. If you're after a specific console-era vibe, the palette_image route is worth the extra wire - matching colors to a real reference is what separates convincing pixel art from a decimation filter. Note the node maps to whatever palette you give it, so a busy reference with a wide gamut won't constrain much; feed it something that already has a tight, characterful palette. And since it processes a batch, it works on video frames too - just keep the settings identical across frames or the palette will shimmer.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| envelope_jsonopt | STRING | — | |
| blend_intensityopt | FLOAT | 1.000–2 | — |
| invertopt | BOOLEAN | false | — |
| maskopt | IMAGE | — | |
| pixel_sizeopt | FLOAT | 151–100 | — |
| color_depthopt | FLOAT | 501–255 | — |
| use_aspect_ratioopt | BOOLEAN | true | — |
| palette_imageopt | IMAGE | — | |
| palette_colorsopt | INT | 162–16 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |