ComfyUI Node
Sam2 Segment
A ComfyUI node in SAM2 with 11 inputs and 1 output.
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)
| Name | Type | Default | Description |
|---|---|---|---|
| sam2_model | SAM2MODEL | — | |
| image | IMAGE | — | |
| keep_model_loaded | BOOLEAN | false | — |
| coordinates_positiveopt | STRING | — | |
| coordinates_negativeopt | STRING | — | |
| bboxesopt | BBOX | — | |
| individual_objectsopt | BOOLEAN | false | — |
| maskopt | MASK | — | |
| mask_thresholdopt | FLOAT | 0.0-10–10 | Threshold for converting mask logits to binary. Positive=stricter, negative=looser |
| max_hole_areaopt | FLOAT | 00–100 | Fill holes smaller than this area (0=disabled) |
| max_sprinkle_areaopt | FLOAT | 00–100 | Remove isolated regions smaller than this area (0=disabled) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mask | MASK | — |