> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# VAE解码（VAEDecode）

<div class="node-meta"><code>VAEDecode</code><span>model/latent</span><span>角色：潜空间解码</span><span class="star">★ 常用节点</span></div>

VAEDecode 节点专用于使用指定的变分自编码器（VAE）将潜在表示解码为图像。其目的是从压缩数据表示中生成图像，促进从潜在空间编码中重建图像。

## 参数

| 参数        | 类型           | 默认 / 范围 | 说明                                                     |
| --------- | ------------ | ------- | ------------------------------------------------------ |
| `samples` | LATENT · 潜空间 | —（连线输入） | LATENT。采样器的输入/输出，需 VAE 解码才能看图。                         |
| `vae`     | VAE · 自编码器   | —（连线输入） | `vae` 参数指定用于将潜在表示解码为图像的变分自编码器模型。它对于确定解码机制和重建图像的质量至关重要。 |

## 输出

| 输出 | 类型    | 说明 |
| -- | ----- | -- |
| 图像 | IMAGE | 图像 |

## 怎么接

- **上游**：EmptyLatentImage / VAEEncode / KSampler
- **下游**：VAEEncode / SaveImage / 下一个图像节点
- **接线**：把采样器输出的 `samples`(LATENT) 接进来，并对上同家族的 `vae`（SD1.5 / SDXL / Flux 的 latent 互不通用）；输出的 IMAGE 直接进 SaveImage 或 PreviewImage。

## 使用案例

潜空间转像素图的唯一出口。`samples` 接采样器的 LATENT，`vae` 接模型的 VAE 输出。

容易出错的两个地方：

- 用了单独的 VAE 文件（`VAELoader`）却还在用底模自带的 VAE，两边的潜空间口径可能不一致，出图会发灰或偏色；
- 视频工作流里 `samples` 是多帧 latent，解码出来也是 IMAGE 批次，必须再走一次 `CreateVideo` 才能变成视频。

## 端口与连线示意

![VAEDecode 端口与连线示意](/svg/VAEDecode.svg)

## 实战提示

- VAE 必须与主模型同家族（SD1.5 的 VAE 不能解 SDXL、Flux 的 latent）。

## 同类节点

[空Latent图像](/nodes/04/EmptyLatentImage.md) · [合成Latent](/nodes/04/LatentComposite.md) · [合成Latent遮罩](/nodes/04/LatentCompositeMasked.md) · [缩放Latent](/nodes/04/LatentUpscale.md) · [缩放Latent（比例）](/nodes/04/LatentUpscaleBy.md) · [加载Latent](/nodes/04/LoadLatent.md) · [保存Latent](/nodes/04/SaveLatent.md) · [设置Latent噪波遮罩](/nodes/04/SetLatentNoiseMask.md) · [VAE解码（分块）](/nodes/04/VAEDecodeTiled.md) · [VAE编码](/nodes/04/VAEEncode.md) · [VAE编码（局部重绘）](/nodes/04/VAEEncodeForInpaint.md) · [空Latent音频](/nodes/04/EmptyLatentAudio.md)
