Nodes/Ray's Orenchi/✨ Ray's VFX: Pixel Art
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.

By MutantSparrow·Created 4 months ago·Updated 3 days ago· 1
✨ 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)

NameTypeDefaultDescription
imageIMAGEConnect the source image or batch.
input_kindCOMBORecover an existing pixel grid, or abstract an illustration/photo into a smaller set of readable regions.
modeCOMBOmanual_resizeChoose target size, detected grid size, or source pixels per output pixel.
target_resolutionINT1281–4096Longest 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_sizeINT81–128Choose source pixels per output pixel in pixel_size mode.
samplingCOMBOUse structure reconstruction for repair, region abstraction for illustration/photo, nearest for crisp sampling, or area for averaging.
reduce_paletteBOOLEANtrueReduce colors and enable palette-based dithering. A connected palette always takes precedence.
max_colorsINT322–256Limit generated palettes. Connected palettes with at most 256 distinct colors are preserved in full.
palette_styleCOMBOKeep source shading, or merge near-duplicate generated shades for clearer color clusters. Supplied palettes stay unchanged.
ditherCOMBOChoose no dither, a stable ordered pattern, or serpentine error diffusion. Protect strong edges automatically.
dither_strengthFLOAT0.700–1Control dither intensity without changing the palette.
outlineCOMBOUse a dark inner contour or a colored contour guided by nearby shading. Connect foreground_mask for complex backgrounds.
palette_strategyCOMBOcolor_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_highlightsBOOLEANtrueReserve 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_thresholdINT9050–100CIE Lab lightness cutoff, matching the original node. Lower this if important highlights are less bright.
color_gridBOOLEANfalseReplace 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_levelsINT42–8Lightness bands per chroma family for ramps_oklab; total palette still respects max_colors.
palette_allocationCOMBOFavor coherent color areas and spend fewer shades on busy texture, or use ordinary color frequency. Highlight protection applies to both. No semantic recognition.
palette_mappingCOMBOHow 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.
seedINT-1-1–2147483647-1 for random; any >=0 value is reproducible.
palette_imageoptIMAGEConnect clean color swatches. Preserve up to 256 exact RGB colors; larger images are reduced to max_colors.
foreground_maskoptMASKOptional outline mask: 1 is subject, 0 is background. Invert Load Image alpha masks before connecting.

Outputs (2)

NameTypeDescription
imageIMAGEPixel-resolution image: exact source grid for repair, rounded aspect ratio for illustration/photo.
previewIMAGENearest-neighbor preview, or labeled method comparison when color grid is enabled.