> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# SAM3_TrackToMask - ComfyUI Built-in Node Documentation

> Complete documentation for the SAM3_TrackToMask node in ComfyUI. Learn its inputs, outputs, parameters and usage.

## Overview

Selects specific tracked objects from a SAM3 tracking session by their index numbers and combines them into a single output mask. This allows you to choose which objects to keep and which to ignore from the tracking results.

## Inputs

| Parameter        | Description                                                                                                                    | Data Type     | Required | Range                                |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------- | -------- | ------------------------------------ |
| `track_data`     | The tracking data output from a SAM3 tracker node, containing the packed masks and original image size.                        | SAM3TRACKDATA | Yes      | N/A                                  |
| `object_indices` | Comma-separated object indices to include in the output mask (e.g., '0,2,3'). If left empty, all tracked objects are included. | STRING        | No       | Any comma-separated list of integers |

## Outputs

| Output Name | Description                                                                                                                                                         | Data Type |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
| `masks`     | A single binary mask for each frame, where selected objects are combined into one mask. If no objects are selected or no tracking data exists, returns a zero mask. | MASK      |

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/SAM3_TrackToMask/en.md)

***

**Source fingerprint (SHA-256):** `77c9f5142f2078fabb81e58979df01ad9ec41d3de953939570bebb4f2687f8ad`
