> ## 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.

# MaskPreview - ComfyUI Built-in Node Documentation

> Complete documentation for the MaskPreview 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/MaskPreview/zh.md)

MaskPreview 节点通过将遮罩转换为三通道图像格式并保存为临时文件，生成遮罩的可视化预览。它接收遮罩输入并将其重塑为适合图像显示的格式，然后将结果保存到临时目录并附带随机文件名前缀。这使用户能够在工作流执行过程中直观检查遮罩数据。

## 输入参数

| 参数名               | 数据类型           | 必填 | 取值范围 | 描述                     |
| ----------------- | -------------- | -- | ---- | ---------------------- |
| `mask`            | MASK           | 是  | -    | 需要预览并转换为图像格式的遮罩数据      |
| `filename_prefix` | STRING         | 否  | -    | 输出文件名的前缀（默认为"ComfyUI"） |
| `prompt`          | PROMPT         | 否  | -    | 用于元数据的提示信息（自动提供）       |
| `extra_pnginfo`   | EXTRA\_PNGINFO | 否  | -    | 用于元数据的额外PNG信息（自动提供）    |

## 输出结果

| 输出名称 | 数据类型 | 描述                |
| ---- | ---- | ----------------- |
| `ui` | DICT | 包含用于显示的预览图像信息和元数据 |
