ComfyUI Node

💀Image SAM2

A ComfyUI node in 💀S4Tool with 16 inputs and 2 outputs.

By S4MUEL-404·Created about a year ago·Updated 9 months ago· 3
💀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)

NameTypeDefaultDescription
sam2_model_nameCOMBOsam2.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_nameCOMBOGroundingDINO_SwinT_OGC (694MB)2 options: GroundingDINO_SwinT_OGC (694MB), GroundingDINO_SwinB (938MB)
imageIMAGE
promptSTRINGobject
thresholdFLOAT0.300–1
quality_thresholdFLOAT0.000–1Filter out low-quality segmentations (0 = no filtering)
refinement_levelCOMBOstandardMask refinement quality: none (fastest) to aggressive (best quality)
edge_expansionINT0-20–20Expand (positive) or shrink (negative) mask edges
fill_holesBOOLEANtrueFill small holes in masks
remove_small_regionsINT1000–1000Remove regions smaller than N pixels (0 = disabled)
smooth_edgesBOOLEANtrueSmooth mask edges
smooth_strengthFLOAT1.00–5Edge smoothing strength (0 = sharp, 5 = very soft)
max_detectionsINT00–100Maximum number of detection results to output (0 = unlimited)
nms_thresholdFLOAT0.800–1Non-Maximum Suppression threshold for removing overlapping boxes (1.0 = disabled)
box_paddingINT0-50–50Expand (positive) or shrink (negative) detection boxes in pixels
min_box_sizeINT00–500Filter out detection boxes smaller than N pixels (0 = disabled)

Outputs (2)

NameTypeDescription
segmented_imageIMAGE
maskMASK