ComfyUI > Nodes > ComfyUI PixelArt Detector > 🎨PixelArt Palette Loader

ComfyUI Node: 🎨PixelArt Palette Loader

Class Name

PixelArtLoadPalettes

Category
image/PixelArt🕹️
Author
dimtoneff (Account age: 3423days)
Extension
ComfyUI PixelArt Detector
Latest Updated
2024-06-14
Github Stars
0.17K

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

🎨PixelArt Palette Loader Description

Load and apply predefined color palettes for pixel art creation with nostalgic video game styles.

🎨PixelArt Palette Loader:

The PixelArtLoadPalettes node is designed to load and apply predefined color palettes to images, transforming them into pixel art with a nostalgic feel. This node supports popular palettes such as NES and GAME BOY, allowing you to convert your images to these classic styles effortlessly. By leveraging this node, you can achieve a retro aesthetic that mimics the look of vintage video games. The node scans a directory for images and retrieves the color palette for a selected image or all images, which can then be displayed in a grid format. This functionality is particularly useful for artists looking to create pixel art or apply a specific color scheme to their digital artwork.

🎨PixelArt Palette Loader Input Parameters:

images

This parameter accepts a list of images that you want to convert using the selected palette. The images should be in a format that is compatible with the node's processing capabilities.

palette

This parameter allows you to choose the color palette to apply to your images. The available options are NES and GAMEBOY, with the default set to GAMEBOY. Selecting a different palette will change the color scheme of the output image to match the chosen retro style.

pixelize

This parameter specifies the method used to pixelate the image. The available options are Image.quantize, Grid.pixelate, NP.quantize, and OpenCV.kmeans.reduce, with the default set to Image.quantize. Each method offers a different approach to pixelation, affecting the final appearance of the image.

grid_pixelate_grid_scan_size

This integer parameter defines the grid scan size for the Grid.pixelate method. It has a default value of 2, with a minimum of 1 and a maximum of 32. Adjusting this value changes the granularity of the pixelation effect.

resize_w

This integer parameter sets the width to which the image will be resized before applying the palette. The default value is 512, with a minimum of 0 and a maximum of 2048. Resizing can help standardize the image dimensions for consistent results.

resize_h

This integer parameter sets the height to which the image will be resized before applying the palette. The default value is 512, with a minimum of 0 and a maximum of 2048. Similar to the width, resizing the height ensures uniformity in the output.

reduce_colors_before_palette_swap

This boolean parameter determines whether to reduce the number of colors in the image before applying the palette swap. The default is False, with options to enable (label_on) or disable (label_off) this feature. Reducing colors can simplify the image and enhance the retro effect.

reduce_colors_max_colors

This integer parameter sets the maximum number of colors to retain when reducing colors before the palette swap. The default value is 128, with a minimum of 1 and a maximum of 256. This setting controls the color complexity of the image.

apply_pixeldetector_max_colors

This boolean parameter decides whether to apply a maximum color limit using the pixel detector. The default is True, with options to enable (label_on) or disable (label_off) this feature. Limiting colors can help achieve a more authentic pixel art look.

image_quantize_reduce_method

This parameter specifies the method used to reduce colors during image quantization. The available options are MAXCOVERAGE, MEDIANCUT, and FASTOCTREE, with the default set to MAXCOVERAGE. Each method offers a different approach to color reduction, impacting the final image quality.

🎨PixelArt Palette Loader Output Parameters:

paletteList

This output parameter returns a list of palettes that have been loaded from the specified directory. Each palette in the list includes the color data and additional settings for grid display. This output is essential for applying the selected palette to your images and achieving the desired pixel art effect.

🎨PixelArt Palette Loader Usage Tips:

  • To achieve the best results, ensure your input images are of high quality and have a resolution that matches your desired output size.
  • Experiment with different pixelize methods to find the one that best suits your artistic vision. Each method offers a unique style of pixelation.
  • Use the reduce_colors_before_palette_swap option to simplify complex images and enhance the retro aesthetic. This can be particularly useful for images with a wide range of colors.
  • Adjust the grid_pixelate_grid_scan_size to control the level of detail in the pixelation. Smaller values will result in finer details, while larger values will create a more blocky effect.

🎨PixelArt Palette Loader Common Errors and Solutions:

FileNotFoundError: [Errno 2] No such file or directory

  • Explanation: This error occurs when the specified directory for loading palettes does not exist or the image file is not found.
  • Solution: Ensure that the directory path is correct and that the image files are located in the specified directory.

ValueError: Invalid palette selected

  • Explanation: This error occurs when an invalid palette name is provided.
  • Solution: Verify that the palette name is either NES or GAMEBOY and that it is correctly spelled.

TypeError: Unsupported image format

  • Explanation: This error occurs when the input image is in an unsupported format.
  • Solution: Convert your images to a supported format such as PNG or JPEG before using the node.

IndexError: List index out of range

  • Explanation: This error occurs when trying to access an element in a list that does not exist, often due to an empty list.
  • Solution: Ensure that the directory contains images and that the list of images is not empty before processing.

🎨PixelArt Palette Loader Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI PixelArt Detector
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.