> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-mintlify-b90d3c69.mintlify.site/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.

## 概述

通过索引编号从 SAM3 跟踪会话中选择特定的跟踪对象，并将其合并为单个输出遮罩。这使您能够从跟踪结果中选择要保留的对象，并忽略不需要的对象。

## 输入

| 参数     | 描述                                             | 数据类型          | 是否必填 | 范围          |
| ------ | ---------------------------------------------- | ------------- | ---- | ----------- |
| `跟踪数据` | 来自 SAM3 跟踪器节点的跟踪数据输出，包含打包的遮罩和原始图像尺寸。           | SAM3TRACKDATA | 是    | 无           |
| `对象索引` | 要包含在输出遮罩中的逗号分隔对象索引（例如：'0,2,3'）。如果留空，则包含所有跟踪对象。 | STRING        | 否    | 任意逗号分隔的整数列表 |

## 输出

| 输出名称    | 描述                                                  | 数据类型 |
| ------- | --------------------------------------------------- | ---- |
| `masks` | 每帧的单个二进制遮罩，其中选定的对象合并为一个遮罩。如果未选择任何对象或不存在跟踪数据，则返回零遮罩。 | MASK |

> 本文档由 AI 生成。如果您发现任何错误或有改进建议，欢迎贡献！ [在 GitHub 上编辑](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/SAM3_TrackToMask/zh.md)

***

**Source fingerprint (SHA-256):** `2da82effc4cdc6655d0d37e281858bf33f7b62d9056629ec810e3ff9b2e7b5a6`
