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

# VAEEncodeForInpaint - ComfyUI Built-in Node Documentation

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

此节点专为将图像编码为适用于修复任务的潜在表示而设计，并包含额外的预处理步骤，以调整输入图像和遮罩，确保 VAE 模型能够进行最佳编码。

## 输入

| 参数     | 描述                                                  | 数据类型    |
| ------ | --------------------------------------------------- | ------- |
| `像素`   | 待编码的输入图像。该图像在编码前会经过预处理和尺寸调整，以匹配 VAE 模型预期的输入尺寸。      | `IMAGE` |
| `vae`  | 用于将图像编码为潜在表示的 VAE 模型。它在转换过程中起着关键作用，决定了输出潜在空间的质量和特征。 | VAE     |
| `遮罩`   | 指示输入图像中需要修复区域的遮罩。它用于在编码前修改图像，确保 VAE 聚焦于相关区域。        | `MASK`  |
| `扩展遮罩` | 指定修复遮罩的扩展量，以确保潜在空间中的过渡无缝。数值越大，修复影响的区域越大。            | `INT`   |

## 输出

| 参数       | 描述                                   | 数据类型     |
| -------- | ------------------------------------ | -------- |
| `latent` | 输出包括图像的编码潜在表示和噪声遮罩，两者对于后续的修复任务都至关重要。 | `LATENT` |

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