ComfyUI Node
Color Patch Merge
Groups similar colors and replaces them with their local averages.
Color Patch Merge
- image
- mask
- OUTPUT
- ALPHA
◄merge_tolerance0.05►
◄neighborhood3►
◄min_area20►
◄iterations2►
◄use_labtrue►
◄merge_solutionSmooth►
CategoryWakaura
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | The image to be processed. | |
| merge_tolerance | FLOAT | 0.050–1 | How different colors can be to stay in the same group. |
| neighborhood | INT | 33–31 | The neighborhood size (diameter) for the bilateral filter. Used for 'Smooth' merging solution. |
| min_area | INT | 202–1024 | The minimum area size for color patches. Used for 'Unify' merging solution. |
| iterations | INT | 21–16 | Number of growth iterations for color patches. More iterations result in larger, more uniform color regions. Used for 'Unify' merging solution. |
| use_lab | BOOLEAN | true | Convert RGB space to Lab colors. |
| merge_solution | COMBO | Smooth | How to handle the color merging. |
| maskopt | MASK | Optional alpha channel mask. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| OUTPUT | IMAGE | — |
| ALPHA | MASK | — |