ComfyUI Node

Sam2 Segment

A ComfyUI node in SAM2 with 11 inputs and 1 output.

By PozzettiAndrea·Created 10 months ago·Updated 23 days ago· 45
Sam2 Segment
  • sam2_model
  • image
  • bboxes
  • mask
  • mask
keep_model_loadedfalse
coordinates_positive
coordinates_negative
individual_objectsfalse
mask_threshold0.0
max_hole_area0
max_sprinkle_area0
CategorySAM2

Inputs (11)

NameTypeDefaultDescription
sam2_modelSAM2MODEL
imageIMAGE
keep_model_loadedBOOLEANfalse
coordinates_positiveoptSTRING
coordinates_negativeoptSTRING
bboxesoptBBOX
individual_objectsoptBOOLEANfalse
maskoptMASK
mask_thresholdoptFLOAT0.0-10–10Threshold for converting mask logits to binary. Positive=stricter, negative=looser
max_hole_areaoptFLOAT00–100Fill holes smaller than this area (0=disabled)
max_sprinkle_areaoptFLOAT00–100Remove isolated regions smaller than this area (0=disabled)

Outputs (1)

NameTypeDescription
maskMASK