Nodes/ComfyUI-SAM2Matting/SAM2Matting Video
ComfyUI Node

SAM2Matting Video

Treats the complete ordered IMAGE batch as one video, seeds the selected frame with a white-foreground mask, and propagates a single temporal predictor state in both directions. Returns only the ordered alpha batch to avoid caching duplicate full-resolution RGB and preview batches.

By ethanfel·Created 17 days ago·Updated 9 days ago· 5
SAM2Matting Video
  • model
  • images
  • initial_mask
  • alpha
mask_frame0
mask_threshold0.50
memory_modebalanced
CategorySAM2Matting/video

Inputs (6)

NameTypeDefaultDescription
modelSAM2MATTING_VIDEO_MODEL
imagesIMAGE
initial_maskMASK
mask_frameINT00–2147483647
mask_thresholdFLOAT0.500–1
memory_modeCOMBObalanced3 options: balanced, low_vram, maximum_speed

Outputs (1)

NameTypeDescription
alphaMASK