ComfyUI Node
Sprite Fusion Pixel Snapper
A ComfyUI node in image/transform with 14 inputs and 1 output.
Sprite Fusion Pixel Snapper
- image
- IMAGE
◄k_colors16►
◄k_seed42►
◄output_scale1►
◄max_kmeans_iterations15►
◄peak_threshold_multiplier0.20►
◄peak_distance_filter4►
◄walker_search_window_ratio0.35►
◄walker_min_search_window2.0►
◄walker_strength_threshold0.50►
◄min_cuts_per_axis4►
◄fallback_target_segments64►
◄max_step_ratio1.80►
◄pixel_size0.0►
Categoryimage/transform
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | IMAGE tensor (batch supported). Returns list of images. | |
| k_colors | INT | 161–512 | Palette size for color quantization (K-Means) |
| k_seed | INT | 420–2147483647 | Random seed used when seeding K-Means++ centroids |
| output_scaleopt | INT | 11–16 | Integer upscaling factor (nearest-neighbor) applied after snapping |
| max_kmeans_iterationsopt | INT | 151–200 | Upper limit on K-Means iterations while learning the palette |
| peak_threshold_multiplieropt | FLOAT | 0.200–5 | Fraction of max gradient used as threshold to keep profile peaks |
| peak_distance_filteropt | INT | 41–512 | Minimum pixel spacing between retained peaks in the profile |
| walker_search_window_ratioopt | FLOAT | 0.350.01–5 | Search window size as a fraction of estimated step when walking cuts |
| walker_min_search_windowopt | FLOAT | 2.00.1–32 | Minimum search window (pixels) around each target cut |
| walker_strength_thresholdopt | FLOAT | 0.500–5 | Peak must exceed mean*threshold; otherwise fallback to uniform cut |
| min_cuts_per_axisopt | INT | 42–512 | Lowest number of cut positions per axis (including ends) |
| fallback_target_segmentsopt | INT | 641–2048 | Target number of cells when step detection fails; derives fallback step |
| max_step_ratioopt | FLOAT | 1.801–5 | Max allowed X/Y step ratio before snapping to a uniform grid |
| pixel_sizeopt | FLOAT | 0.00–10000 | Override detected pixel size in input pixels; 0 keeps auto-detection |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |