ComfyUI Node
✨ Ray's VFX: Pixel Art
Repair an exact pixel grid or convert an illustration/photo at the requested resolution with a rounded aspect ratio. Select perceptual colors and optionally dither or outline.
✨ Ray's VFX: Pixel Art
- image
- palette_image
- foreground_mask
- image
- preview
◄input_kind▾►
◄modemanual_resize►
◄target_resolution128►
◄pixel_size8►
◄sampling▾►
◄reduce_palettetrue►
◄max_colors32►
◄palette_style▾►
◄dither▾►
◄dither_strength0.70►
◄outline▾►
◄palette_strategy▾►
◄protect_highlightstrue►
◄highlight_threshold90►
◄color_gridfalse►
◄ramp_levels4►
◄palette_allocation▾►
◄palette_mapping▾►
◄seed-1►
Category👑 Ray/✨ VFX
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Connect the source image or batch. | |
| input_kind | COMBO | Recover an existing pixel grid, or abstract an illustration/photo into a smaller set of readable regions. | |
| mode | COMBO | manual_resize | Choose target size, detected grid size, or source pixels per output pixel. |
| target_resolution | INT | 1281–4096 | Longest side. Repair snaps to the exact aspect-ratio lattice without upscaling; illustration/photo uses this edge and rounds the other dimension to the nearest pixel. Also the auto-detection fallback. |
| pixel_size | INT | 81–128 | Choose source pixels per output pixel in pixel_size mode. |
| sampling | COMBO | Use structure reconstruction for repair, region abstraction for illustration/photo, nearest for crisp sampling, or area for averaging. | |
| reduce_palette | BOOLEAN | true | Reduce colors and enable palette-based dithering. A connected palette always takes precedence. |
| max_colors | INT | 322–256 | Limit generated palettes. Connected palettes with at most 256 distinct colors are preserved in full. |
| palette_style | COMBO | Keep source shading, or merge near-duplicate generated shades for clearer color clusters. Supplied palettes stay unchanged. | |
| dither | COMBO | Choose no dither, a stable ordered pattern, or serpentine error diffusion. Protect strong edges automatically. | |
| dither_strength | FLOAT | 0.700–1 | Control dither intensity without changing the palette. |
| outline | COMBO | Use a dark inner contour or a colored contour guided by nearby shading. Connect foreground_mask for complex backgrounds. | |
| palette_strategy | COMBO | color_families prioritizes distinct hue/lightness groups and neutral colors before extra shades; assignment also protects family identity. Other methods retain their previous behavior. This is not semantic material recognition. | |
| protect_highlights | BOOLEAN | true | Reserve bright source colors inside the color budget. color_families preserves main families first and protects neutral glints only with spare slots. Other methods can reserve neutral and warm highlights. Supplied palettes are unchanged. |
| highlight_threshold | INT | 9050–100 | CIE Lab lightness cutoff, matching the original node. Lower this if important highlights are less bright. |
| color_grid | BOOLEAN | false | Replace only preview with a labeled 3-by-3 grid: the exact current image output followed by all six generated color methods. Uses max_colors and the same seed/effects. Main image stays unchanged. Integer nearest-neighbor tile scaling; extra processing required. |
| ramp_levels | INT | 42–8 | Lightness bands per chroma family for ramps_oklab; total palette still respects max_colors. |
| palette_allocation | COMBO | Favor coherent color areas and spend fewer shades on busy texture, or use ordinary color frequency. Highlight protection applies to both. No semantic recognition. | |
| palette_mapping | COMBO | How pixels choose from the palette, including connected palettes. auto preserves existing behavior; legacy_oklab restores the original node's near-black handling; oklab/Lab use perceptual distance; rgb uses channel distance; color_families adds hue-family preference. Does not change the palette's colors. | |
| seed | INT | -1-1–2147483647 | -1 for random; any >=0 value is reproducible. |
| palette_imageopt | IMAGE | Connect clean color swatches. Preserve up to 256 exact RGB colors; larger images are reduced to max_colors. | |
| foreground_maskopt | MASK | Optional outline mask: 1 is subject, 0 is background. Invert Load Image alpha masks before connecting. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | Pixel-resolution image: exact source grid for repair, rounded aspect ratio for illustration/photo. |
| preview | IMAGE | Nearest-neighbor preview, or labeled method comparison when color grid is enabled. |