/ComfyUI-PixelDetector

Downscale and restore pixel art images directly inside ComfyUI.

Primary LanguagePythonMIT LicenseMIT

ComfyUI - Pixel Detector

Downscale and restore pixel art images that have been resized or corrupted.

This is primarily created to fix compression issues from saving pixel art in jpg format.

Exaggerated example

Example

Installation

Download the ComfyUI-PixelDetector.py into custom_nodes folder.

Usage

Palette: If enabled, automatically reduces the image to predicted color palette. Max Colors: Max colors for computation, more = slower, default = 128

Credits

Thanks to @Astropulse and @paultron for the downscaling logic. I just wrapped it as is into a ComfyUI custom node. Big thanks to https://github.com/paultron for numpy-ifying the downscale calculation and making it tons faster.

Test image by Skeddles https://lospec.com/gallery/skeddles/rock-and-grass