Nodes/ComfyUI-TBG-SAM3/TBG SAM3 Segmentation
ComfyUI Node

TBG SAM3 Segmentation

A ComfyUI node in TBG/SAM3 with 13 inputs and 7 outputs.

By Ltamann·Created 9 months ago·Updated 17 days ago· 167
TBG SAM3 Segmentation
  • sam3_model
  • image
  • sam3_selectors_pipe
  • mask_prompt
  • masks
  • visualization
  • boxes
  • scores
  • segs
  • combined_mask
  • combined_segs
confidence_threshold0.40
pipeline_modeall
detect_alltrue
max_detections50
instancesfalse
crop_factor1.5
min_size100
fill_holesfalse
text_prompt
CategoryTBG/SAM3

Inputs (13)

NameTypeDefaultDescription
sam3_modelSAM3_MODELSAM3 model loaded from LoadSAM3Model node
imageIMAGEInput image to perform segmentation on
confidence_thresholdFLOAT0.400–1Minimum confidence score to keep detections. Lower threshold (0.2) works better with SAM3's presence scoring
pipeline_modeCOMBOallWhich prompts from pipeline to use.
detect_allBOOLEANtrueWhen enabled, detects all objects. When disabled, uses max_detections value.
max_detectionsINT501–100Maximum detections when detect_all is disabled.
instancesBOOLEANfalseWhen ON: keep only detections whose boxes overlap a positive box or contain a positive point. When OFF: return all SAM3 detections including instances.
crop_factorFLOAT1.51–4Crop factor used when building combined SEGS (Impact Pack style). 1.0 = tight bbox.
min_sizeINT1001–500Minimum segment size in pixels as a square side. 1=1x1, 200=200x200; smaller masks are discarded.
fill_holesBOOLEANfalseWhen enabled, fills holes inside each mask (solid segments).
text_promptoptSTRINGText to guide segmentation (optional).
sam3_selectors_pipeoptSAM3_PROMPT_PIPELINEUnified pipeline containing boxes/points).
mask_promptoptMASKOptional mask to refine the segmentation.

Outputs (7)

NameTypeDescription
masksMASK
visualizationIMAGE
boxesSTRING
scoresSTRING
segsSEGS
combined_maskMASK
combined_segsSEGS