Nodes/ComfyUI-lhyNodes/Mask to Coordinates V2 (SAM2)
ComfyUI Node

Mask to Coordinates V2 (SAM2)

Generate positive and negative SAM conditions using mask brush and colored brush.

By lihaoyun6·Created 11 months ago·Updated 5 days ago· 20
Mask to Coordinates V2 (SAM2)
  • mask
  • image
  • coordinates_positive
  • coordinates_negative
threshold0.65
max_regions50
points_per_region1
negative_colorred
CategorylhyNodes/Mask

Inputs (6)

NameTypeDefaultDescription
maskMASKMark on the mask to generate positive conditions.
thresholdFLOAT0.650–1
max_regionsINT501–100
points_per_regionINT11–100
negative_colorCOMBOredred=#FF0000, green=#00FF00, blue=#0000FF, magenta=#FF00FF.
imageoptIMAGEMark the image using a colored brush to generate negative conditions.

Outputs (2)

NameTypeDescription
coordinates_positiveSTRING
coordinates_negativeSTRING