ComfyUI  >  Nodes  >  ComfyUI PixelArt Detector

ComfyUI Extension: ComfyUI PixelArt Detector

Repo Name

ComfyUI-PixelArt-Detector

Author
dimtoneff (Account age: 3423 days)
Nodes
View all nodes (5)
Latest Updated
7/31/2024
Github Stars
0.2K

How to Install ComfyUI PixelArt Detector

Install this extension via the ComfyUI Manager by searching for  ComfyUI PixelArt Detector
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI PixelArt Detector in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

ComfyUI PixelArt Detector Description

ComfyUI PixelArt Detector is a node that optimizes pixel art images by performing operations like downscaling, palette changes, and upscaling to ensure they appear pixel perfect.

ComfyUI PixelArt Detector Introduction

The ComfyUI-PixelArt-Detector is an extension designed to help AI artists generate, downscale, change palettes, and restore pixel art images using the SDXL model. This tool is particularly useful for those who work with pixel art and need to maintain or enhance the quality of their images. Whether you're looking to fix compression issues, change color palettes, or simply create pixel art from scratch, this extension provides a comprehensive set of features to meet your needs.

How ComfyUI PixelArt Detector Works

The ComfyUI-PixelArt-Detector operates by manipulating pixel art images through various processes such as downscaling, palette conversion, and dithering. Here's a simplified breakdown of how it works:

  1. Downscaling: This process reduces the resolution of an image to make it look more pixelated, which is a common characteristic of pixel art.
  2. Palette Conversion: This feature allows you to change the color palette of your image. You can choose from several pre-defined palettes or load custom ones.
  3. Dithering: Dithering adds a retro look to your images by creating a pattern of dots that simulate different shades and colors. By combining these processes, the extension ensures that your pixel art images maintain their intended aesthetic, whether you're creating new art or restoring existing pieces.

ComfyUI PixelArt Detector Features

PixelArt Detector (+Save)

  • All-in-One Node: This node handles palette reduction, resizing, and saving the image.
  • Customization: You can adjust the compression settings and choose between lossy and lossless modes for saving images.

PixelArt Detector (Image->)

  • Downscale and Forward: This node downscales and reduces the palette of an image, then forwards it to another node for further processing.

PixelArt Palette Converter

  • Palette Change: Change the palette of your input image using embedded or custom palettes.
  • Pixelization Algorithms: Choose from different algorithms to reduce colors and replace palettes, such as Image.quantize, Grid.pixelate, NP.quantize, and OpenCV.kmeans.reduce.

PixelArt Palette Loader

  • Custom Palettes: Load a variety of custom palettes to be used with the PixelArt Palette Converter.
  • Grid Preview: Optionally preview all palettes in a grid format for easier selection.

ComfyUI PixelArt Detector Models

The extension does not have different models per se, but it offers various algorithms and methods for processing images. Here are some key methods:

  • Image.quantize: Uses PIL Image functions to reduce colors and replace palettes.
  • Grid.pixelate: A custom algorithm for exchanging palettes, slower but detailed.
  • NP.quantize: Uses fast numpy arrays for palette exchange.
  • OpenCV.kmeans.reduce: Utilizes the OpenCV library for color reduction, effective but slower.

What's New with ComfyUI PixelArt Detector

Update 1.5.2

  • Compatibility Fixes: Fixed issues with Python versions below 3.10 and a scipy 'signal' error.

Update 1.5.1

  • New Dithering Node: Added a new dithering node with prepared and custom patterns, including a black and white palette.

Update 1.5

  • Dithering and Maintenance: Introduced dithering, made the node compatible with different Pillow versions, and fixed various bugs.

Update 1.4

  • OpenCV Library: Added a check and installation for the OpenCV library to fix reported issues.

Update 1.3

  • Node Updates: Updated all four nodes with new features like OpenCV.kmeans for color reduction and various bug fixes.

Update 1.2

  • Upscaling and Downscaling: Improved the pixelization/quantization process based on image size.

Update 1.1

  • Workflow Changes: Changed the default workflow to use the "Save Image" node.

Troubleshooting ComfyUI PixelArt Detector

Common Issues and Solutions

  1. Compatibility Issues: Ensure you are using Python 3.10 or higher to avoid compatibility problems.
  2. Scipy 'Signal' Error: Make sure you have the latest version of scipy installed.
  3. Image Not Saving: Check the compression settings and ensure the output directory is correctly set.

Frequently Asked Questions

  • How do I disable the embedded resize function? Set the width (W) and height (H) to 0 in the node settings.

  • What is the best algorithm for palette conversion? The "MAXCOVERAGE" method in Image.quantize is generally good for pixel art, but feel free to experiment with other methods.

Learn More about ComfyUI PixelArt Detector

For additional resources, tutorials, and community support, you can visit the following links:

  • Free Web Tool for Pixel Art (https://www.pixilart.com/draw) Feel free to experiment and share your creations with the community!

ComfyUI PixelArt Detector Related Nodes

RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.