Nodes/ComfyUI-FairLab/Perfect Pixel
ComfyUI Node

Perfect Pixel

Detect pixel-grid spacing and upscale pixel art with refined dimensions.

By yanhuifair·Created 2 years ago·Updated 2 months ago· 2
Perfect Pixel
  • images
  • scaled_image
  • refined_w
  • refined_h
sample_methodcenter
min_size1
peak_width1
refine_intensity0.25
fix_squaretrue
debugfalse
CategoryFair/image

Inputs (7)

NameTypeDefaultDescription
imagesIMAGE
sample_methodCOMBOcenter3 options: majority, center, median
min_sizeINT1Minimum size of the detected pixel pattern
peak_widthINT1Minimum peak width for peak detection.
refine_intensityFLOAT0.250–0.5Intensity for grid line refinement. Recommended range is [0, 0.5]. Given original estimated grid line at x, the refinement will search in [x * (1 - refine_intensity), x * (1 + refine_intensity)].
fix_squareBOOLEANtrueWhether to enforce output to be square when detected image is almost square.
debugBOOLEANfalseWhether to show debug plots.s

Outputs (3)

NameTypeDescription
scaled_imageIMAGE
refined_wINT
refined_hINT