Nodes/comfy_Pond_Nodes/🐳像素增强
ComfyUI Node

🐳像素增强

AI won't make pixel art, so make it yourself

By Pondowner857·Created about a year ago·Updated 21 days ago· 45
🐳像素增强
  • 图像
  • 图像
处理模式
像素大小8
颜色量化0
抖动false
保持锐利true

The community has a strong and correct position on AI pixel art: models don't really produce it. Diffusion wants to smooth everything into gradients, and pixel art lives and dies by hard edges and a limited palette. The way people actually get good pixel art out of ComfyUI is to generate something close and then convert it - reduce it to a grid, quantize the colors, and upscale with hard nearest-neighbor edges. PixelArtEnhance, from 🐳 Pond Nodes (comfy_Pond_Nodes), is that converter, and it's the most complete of the pack's four pixel tools.

How it works

The core move is the classic downscale-then-upscale: shrink the image so each target "pixel" becomes a single sample, then blow it back up with nearest-neighbor sampling so the blocks come out crisp. Around that, three modes and a few quality controls:

  • 处理模式 (mode): 像素化 (pixelate - the standard grid conversion), 像素校正 (pixel correction - fixes aspect/ratio issues in an already-pixelated source), and 像素优化 (pixel optimize - cleanup pass for existing pixel art).
  • 像素大小 (pixel size, 1–64): the block size. Lower = finer.
  • 颜色量化 (color quantization, 0–256): collapse the palette to a set number of colors. 0 means "don't quantize." This is the single biggest lever for "this looks like pixel art" vs. "this looks like a small photo." Real pixel art has a small palette; 16–64 colors is the classic range.
  • 抖动 (dithering): when quantization is on, this enables Floyd-Steinberg dithering - scattered noise that fakes intermediate colors. On for photographic subjects, off for that clean chunky look.
  • 保持锐利 (keep sharp): nearest-neighbor scaling on the way down (sharp) versus Lanczos smoothing.

One output: 图像.

Installing it

Same pack install as always - Manager search comfy_Pond_Nodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Pondowner857/comfy_Pond_Nodes
cd comfy_Pond_Nodes
pip install -r requirements.txt

Restart, find it under 🐳Pond/图像. Pillow-only; none of the pack's heavy dependencies needed.

The gotcha

The order of operations matters more than any single slider. For best results: generate, downscale in stages, quantize, then upscale. And remember the palette is what sells it - a pixelated image with 256 colors still reads as a blurry photo, not pixel art. Drop 颜色量化 to something aggressive (even 8–32), keep 保持锐利 on, and only add dithering if the result looks banded. If your output looks mushy, the usual culprit is 像素大小 set too small for the resolution - on a 1024px image, a pixel size of 4 gives you a 256-pixel grid, which is a lot of pixels. Size the blocks to the look, not the minimum.

Category🐳Pond/图像

Inputs (6)

NameTypeDefaultDescription
图像IMAGE
处理模式COMBO3 options: 像素化, 像素校正, 像素优化
像素大小INT81–64
颜色量化INT00–256
抖动BOOLEANfalse
保持锐利BOOLEANtrue

Outputs (1)

NameTypeDescription
图像IMAGE