ComfyUI Node
💀Image SAM2
A ComfyUI node in 💀S4Tool with 16 inputs and 2 outputs.
💀Image SAM2
- image
- segmented_image
- mask
◄sam2_model_namesam2.1_hiera_small (200MB)►
◄grounding_dino_model_nameGroundingDINO_SwinT_OGC (694MB)►
◄promptobject►
◄threshold0.30►
◄quality_threshold0.00►
◄refinement_levelstandard►
◄edge_expansion0►
◄fill_holestrue►
◄remove_small_regions100►
◄smooth_edgestrue►
◄smooth_strength1.0►
◄max_detections0►
◄nms_threshold0.80►
◄box_padding0►
◄min_box_size0►
Category💀S4Tool
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| sam2_model_name | COMBO | sam2.1_hiera_small (200MB) | 8 options: sam2.1_hiera_tiny (150MB), sam2.1_hiera_small (200MB), sam2.1_hiera_base_plus (250MB), sam2.1_hiera_large (350MB), sam2_hiera_tiny (150MB), sam2_hiera_small (200MB), +2 |
| grounding_dino_model_name | COMBO | GroundingDINO_SwinT_OGC (694MB) | 2 options: GroundingDINO_SwinT_OGC (694MB), GroundingDINO_SwinB (938MB) |
| image | IMAGE | — | |
| prompt | STRING | object | — |
| threshold | FLOAT | 0.300–1 | — |
| quality_threshold | FLOAT | 0.000–1 | Filter out low-quality segmentations (0 = no filtering) |
| refinement_level | COMBO | standard | Mask refinement quality: none (fastest) to aggressive (best quality) |
| edge_expansion | INT | 0-20–20 | Expand (positive) or shrink (negative) mask edges |
| fill_holes | BOOLEAN | true | Fill small holes in masks |
| remove_small_regions | INT | 1000–1000 | Remove regions smaller than N pixels (0 = disabled) |
| smooth_edges | BOOLEAN | true | Smooth mask edges |
| smooth_strength | FLOAT | 1.00–5 | Edge smoothing strength (0 = sharp, 5 = very soft) |
| max_detections | INT | 00–100 | Maximum number of detection results to output (0 = unlimited) |
| nms_threshold | FLOAT | 0.800–1 | Non-Maximum Suppression threshold for removing overlapping boxes (1.0 = disabled) |
| box_padding | INT | 0-50–50 | Expand (positive) or shrink (negative) detection boxes in pixels |
| min_box_size | INT | 00–500 | Filter out detection boxes smaller than N pixels (0 = disabled) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| segmented_image | IMAGE | — |
| mask | MASK | — |