Pixydust Quantizer is a custom node extension for ComfyUI that allows for the simplified recreation of tile patterns used in 1990s 16-color PC graphics, offering advanced color quantization and palette optimization features.Additionally, it includes a CRT-like effect node that mimics the phosphor glow and slight color bleeding of old CRT displays, adding a nostalgic aesthetic.With version 2.0.0, it now supports batch image processing, enabling efficient handling of video frames and image sequences.
Pixydust Quantizer is a custom node extension for ComfyUI that allows for the simplified recreation of tile patterns used in 1990s 16-color PC graphics, offering advanced color quantization and palette optimization features. Additionally, it includes a CRT-like effect node that mimics the phosphor glow and slight color bleeding of old CRT displays, adding a nostalgic aesthetic. With version 2.0.0, it now supports batch image processing, enabling efficient handling of video frames and image sequences.
The name "Pixydust" combines "pixy" (as in pixel art) and "dust" (to suggest a grainy look), with an added nuance of a clever, tricky effect, like the magic of fairy dust.
Navigate to the custom node directory in ComfyUI:
cd ComfyUI/custom_nodes/
Clone this repository:
git clone https://github.com/yourusername/ComfyUI-Pixydust-Quantizer.git
Install the required dependencies:
pip install -r ComfyUI-Pixydust-Quantizer/requirements.txt
Restart ComfyUI
This node provides comprehensive color reduction and optimization in a single step, streamlining the process that previously required two separate nodes. It handles both initial color reduction and subsequent palette optimization with dithering. Inputs:
Outputs:
Batch Processing Features
This node applies a CRT-like effect to the input image to replicate the appearance of classic CRT monitors. The node adds phosphor glow and subtle color bleed, with independent control over the RGB bleed amount in the X and Y directions. It also provides adjustable gamma and intensity settings for fine-tuning the effect and achieving a retro aesthetic.
Inputs:
image
: Input imagegaussian_width_x
: Horizontal blur width (0.1 to 3.0, default: 1.0)gaussian_width_y
: Vertical blur width (0.1 to 3.0, default: 1.0)intensity_scale
: Overall effect intensity (0.1 to 10.0, default: 1.2)gamma
: Gamma correction value (0.1 to 5.0, default: 2.2)gaussian_kernel_size
: Size of the Gaussian kernel (5, 7, 9, 11, 13, or 15, default: 11)enable_resize
: Enable/disable image resizing (default: enabled)resize_pixels
: Target size for resizing (128 to 512 pixels, default: 256)Outputs:
IMAGE
: Processed image with CRT-like effects appliedNote: The output image dimensions are 4x larger than the input (both width and height are quadrupled to simulate the CRT subpixel pattern)
Basic Image Processing:
CRT-Like Effect Step:
To maintain consistent colors across all frames by using the palette generated from the first frame:
Place two Pixydust Quantizer nodes in your workflow:
batch_mode
to "Single Batch" (this will process only the first frame)batch_mode
to "All Batches" (this will process all frames)Load your video:
image
inputConnect the nodes:
Fixed Palette
output from the first Pixydust Quantizer to the palette_tensor
input of the second Pixydust Quantizer.Process the batch images:
This project is licensed under the MIT License - see the LICENSE file for details.