Extensions/ComfyUI-spritefusion-pixel-snapper
ComfyUI Extension

ComfyUI-spritefusion-pixel-snapper

ComfyUI custom node port of Sprite Fusion Pixel Snapper that snaps pixel art to a clean grid and quantized palette.

By x0x0b·Created 8 months ago·Updated 2 months ago· 18
x0x0b/ComfyUI-spritefusion-pixel-snapper
Nodes1
On cloudLocal install
Categoryimage/transform
Stars18
Updated2 months ago
Readme

Sprite Fusion Pixel Snapper for ComfyUI

Sprite Fusion Pixel Snapper for ComfyUI icon

This custom node is a Python port of the Sprite Fusion Pixel Snapper tool that fixes messy AI-generated pixel art by snapping it to a clean grid and quantized palette.

Install

Place this folder inside ComfyUI/custom_nodes/ and restart ComfyUI.

Node

  • Name: Sprite Fusion Pixel Snapper
  • Category: image/transform

Inputs

  • image – ComfyUI IMAGE tensor (batch supported; returns a list).
  • k_colors (int) – Palette size (default 16).
  • k_seed (int) – RNG seed for palette init (default 42).
  • pixel_size (float) – Override the auto-detected input pixel size; 0.0 keeps auto-detection. Values must be between 1 and half the smallest image dimension.
  • output_scale (int) – Optional integer upscaling after snapping (nearest-neighbor, default 1, max 16).

Additional tuning parameters: max_kmeans_iterations, peak_threshold_multiplier, peak_distance_filter, walker_search_window_ratio, walker_min_search_window, walker_strength_threshold, min_cuts_per_axis, fallback_target_segments, max_step_ratio.

Output

  • IMAGE (List) – per-frame outputs as a list, preserving each frame's size.

Compatibility note

This is a Python port, not a byte-for-byte Rust wrapper; results may differ from upstream.

Credits

  • Upstream repository: https://github.com/Hugo-Dz/spritefusion-pixel-snapper

License