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.
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)
| Name | Type | Default | Description |
|---|---|---|---|
| source_path | STRING | Internal: annotated path of the loaded image or video. | |
| media_type | STRING | Internal: 'image' or 'video'. | |
| coordinates | STRING | [] | Internal: positive point JSON (pixel space of first frame). |
| neg_coordinates | STRING | [] | Internal: negative point JSON (pixel space of first frame). |
| sam3_checkpoint | STRING | Internal: auto-detected checkpoint filename of the connected SAM3 model loader. Used by the preview overlay route only. | |
| max_frames | INT | 00–10000 | Hard cap on decoded video frames (0 = no cap). |
| frame_stride | INT | 11–60 | Decode every N-th video frame (1 = every frame). |
| modelopt | MODEL | Optional 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)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | Loaded frames as an image batch (N frames for video). |
| positive_coords | STRING | Positive point prompts as a SAM3 JSON string. |
| negative_coords | STRING | Negative point prompts as a SAM3 JSON string. |
| fps | FLOAT | Frame rate of the loaded video (0 for images). |
| audio | AUDIO | Audio track extracted from the video (empty for images). |
| initial_mask | MASK | First-frame SAM3 mask, when a model and points are provided. |