Nodes/ComfyUI-Image-Process/Color Patch Merge
ComfyUI Node

Color Patch Merge

Groups similar colors and replaces them with their local averages.

By wakaura-asaho·Created 4 months ago·Updated about a month ago· 1
Color Patch Merge
  • image
  • mask
  • OUTPUT
  • ALPHA
merge_tolerance0.05
neighborhood3
min_area20
iterations2
use_labtrue
merge_solutionSmooth
CategoryWakaura

Inputs (8)

NameTypeDefaultDescription
imageIMAGEThe image to be processed.
merge_toleranceFLOAT0.050–1How different colors can be to stay in the same group.
neighborhoodINT33–31The neighborhood size (diameter) for the bilateral filter. Used for 'Smooth' merging solution.
min_areaINT202–1024The minimum area size for color patches. Used for 'Unify' merging solution.
iterationsINT21–16Number of growth iterations for color patches. More iterations result in larger, more uniform color regions. Used for 'Unify' merging solution.
use_labBOOLEANtrueConvert RGB space to Lab colors.
merge_solutionCOMBOSmoothHow to handle the color merging.
maskoptMASKOptional alpha channel mask.

Outputs (2)

NameTypeDescription
OUTPUTIMAGE
ALPHAMASK