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

# Stable Cascade_C阶段_VAE编码（StableCascade_StageC_VAEEncode）

<div class="node-meta"><code>StableCascade_StageC_VAEEncode</code><span>model/latent/stable cascade</span><span>角色：图像编码</span></div>

StableCascade_StageC_VAEEncode 节点通过 VAE 编码器处理输入图像，为 Stable Cascade 模型生成潜在表示。它首先根据压缩因子和 VAE 的下采样比率调整图像大小，然后对调整后的图像进行编码。该节点输出两个潜在张量：一个用于阶段 C（实际的编码结果），一个用于阶段 B（零填充的占位符）。

## 参数

| 参数            | 类型         | 默认 / 范围  | 说明                     |
| ------------- | ---------- | -------- | ---------------------- |
| `image`       | IMAGE · 图像 | —（连线输入）  | RGB 图像输入；尺寸不一致会被缩放或裁切。 |
| `vae`         | VAE · 自编码器 | —（连线输入）  | 用于编码图像的 VAE 模型         |
| `compression` | INT        | 4 \~ 128 | —                      |

## 输出

| 输出      | 类型     | 说明  |
| ------- | ------ | --- |
| stage_c | LATENT | 潜空间 |
| stage_b | LATENT | 潜空间 |

## 怎么接

- **上游**：LoadImage / VAEDecode
- **下游**：VAEDecode / 下一段采样
- **接线**：把 LoadImage / VAEDecode 出来的 IMAGE 接到 `image`，同家族 VAE 接到 `vae`；输出 LATENT 送进 KSampler 的 `latent_image`——配合 0.4-0.7 的降噪强度就是图生图，先接 SetLatentNoiseMask 则变成局部重绘。

## 使用案例

属于「图像编码」类节点，向下游提供潜空间数据，通常进采样器或解码器。从 `image`、`vae`、`compression`（42） 开始填就能跑起来。典型接法：`LoadImage` → 本节点 → `VAEDecode`。注意：图生图记得把降噪强度调低于 1，否则等于完全重绘。

## 端口与连线示意

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

## 实战提示

- 图生图记得把降噪强度调低于 1，否则等于完全重绘。

## 同类节点

[空Latent图像（Stable Cascade）](/nodes/04/StableCascade_EmptyLatentImage.md)
