> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-docs-recommend-assets-api.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ThresholdMask - ComfyUI Built-in Node Documentation

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

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

ThresholdMask 节点通过应用阈值将遮罩转换为二值遮罩。它会将输入遮罩中的每个像素与指定的阈值进行比较，并创建一个新的遮罩，其中高于阈值的像素变为 1（白色），低于或等于阈值的像素变为 0（黑色）。

## 输入参数

| 参数名  | 数据类型  | 必填 | 取值范围      | 描述                |
| ---- | ----- | -- | --------- | ----------------- |
| `遮罩` | MASK  | 是  | -         | 待处理的输入遮罩          |
| `值`  | FLOAT | 是  | 0.0 - 1.0 | 用于二值化的阈值（默认值：0.5） |

## 输出结果

| 输出名称 | 数据类型 | 描述           |
| ---- | ---- | ------------ |
| `遮罩` | MASK | 经过阈值处理后的二值遮罩 |
