ComfyUI-PixelArt-Detector  by dimtoneff

Pixel art generation and manipulation tool

Created 2 years ago
318 stars

Top 85.0% on SourcePulse

GitHubView on GitHub
Project Summary

This repository provides ComfyUI nodes for advanced pixel art manipulation, including generation, downscaling, palette swapping, and restoration using SDXL. It targets users of ComfyUI looking to integrate sophisticated pixel art workflows, offering precise control over image aesthetics and enabling the creation of retro-style graphics.

How It Works

The nodes leverage a combination of image processing techniques and algorithms for pixel art enhancement. Key features include palette reduction and swapping using various methods like Image.quantize and NumPy-based quantization, dithering for retro effects, and intelligent resizing that upscales small images before pixelization and downscales larger ones afterward. It also incorporates the Astropulse/pixeldetector for dominant color analysis and offers a palette generator that extracts color schemes from input images.

Quick Start & Requirements

  • Install by cloning the repository into the ComfyUI/custom_nodes/ directory:
    git clone https://github.com/dimtoneff/ComfyUI-PixelArt-Detector
    
  • For WebP saving, clone the ComfyUI-Saveaswebp repository as well:
    git clone https://github.com/dimtoneff/ComfyUI-Saveaswebp
    
  • Compatible with ComfyUI v0.3.49.
  • Requires Python 3.10+.
  • Official example workflows are available in the example_workflows directory.

Highlighted Details

  • Offers multiple color reduction algorithms (e.g., MEDIANCUT, MAXCOVERAGE, OpenCV.kmeans, Pycluster.kmeans) for fine-tuning pixel art aesthetics.
  • Includes a PixelArtAddDitherPattern node for applying dither patterns, with support for custom masks.
  • Supports saving images in WebP format with optional JPEG alongside, including compression and lossy/lossless options.
  • Features a PixelArtPaletteGenerator for creating custom palettes from images, outputting both an image and a color list.

Maintenance & Community

The project actively incorporates community contributions and bug fixes, with recent updates addressing compatibility issues with Python versions and Pillow library updates. Discussions and support are available through the GitHub issues page.

Licensing & Compatibility

The repository's license is not explicitly stated in the provided README. However, it depends on ComfyUI-Saveaswebp, which is also not explicitly licensed in the provided text. Users should verify licensing for commercial use.

Limitations & Caveats

The README notes that older versions of the nodes may require deletion and re-addition to workflows. Some advanced options, like grid.pixelate with a grid_pixelate_grid_scan_size of 1, can be very slow. The effectiveness of certain color reduction and cleanup methods may require experimentation.

Health Check
Last Commit

2 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
1
Star History
3 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.