Nodes/comfyui-timesaver/TS SAM Media Loader
ComfyUI Node

TS SAM Media Loader

Load an image or video and click positive (green) / negative (red) points directly on the first frame. Outputs IMAGE (batch=N frames for video) plus positive_points and negative_points in the SAM3 prompt format consumed by the native SAM3 Point Segmentation / Video Segmentation nodes.

By AlexYez·Created 2 years ago·Updated 3 days ago· 11
TS SAM Media Loader
  • model
  • images
  • positive_coords
  • negative_coords
  • fps
  • audio
  • initial_mask
source_path
media_type
coordinates[]
neg_coordinates[]
sam3_checkpoint
max_frames0
frame_stride1
CategoryTS/Image/Cutout

Inputs (8)

NameTypeDefaultDescription
source_pathSTRINGInternal: annotated path of the loaded image or video.
media_typeSTRINGInternal: 'image' or 'video'.
coordinatesSTRING[]Internal: positive point JSON (pixel space of first frame).
neg_coordinatesSTRING[]Internal: negative point JSON (pixel space of first frame).
sam3_checkpointSTRINGInternal: auto-detected checkpoint filename of the connected SAM3 model loader. Used by the preview overlay route only.
max_framesINT00–10000Hard cap on decoded video frames (0 = no cap).
frame_strideINT11–60Decode every N-th video frame (1 = every frame).
modeloptMODELOptional SAM3 model. Connect a SAM3 checkpoint loader to enable the in-node blue mask preview overlay. The link is preview-only: the workflow's SAM3 Detect should be wired to the loader directly.

Outputs (6)

NameTypeDescription
imagesIMAGELoaded frames as an image batch (N frames for video).
positive_coordsSTRINGPositive point prompts as a SAM3 JSON string.
negative_coordsSTRINGNegative point prompts as a SAM3 JSON string.
fpsFLOATFrame rate of the loaded video (0 for images).
audioAUDIOAudio track extracted from the video (empty for images).
initial_maskMASKFirst-frame SAM3 mask, when a model and points are provided.