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

# 获取潜空间尺寸（GetLatentSize）

<div class="node-meta"><code>GetLatentSize</code><span>latent</span><span>角色：数值读取</span></div>

读取 LATENT 的宽高与通道数，输出整数，便于做动态分辨率计算。

## 参数

| 参数       | 类型           | 默认 / 范围 | 说明      |
| -------- | ------------ | ------- | ------- |
| `latent` | LATENT · 潜空间 | —（连线输入） | LATENT。 |

## 输出

| 输出         | 类型  | 说明 |
| ---------- | --- | -- |
| width      | INT | 整数 |
| height     | INT | 整数 |
| frames     | INT | 整数 |
| batch_size | INT | 整数 |

## 怎么接

- **上游**：EmptyLatentImage / VAEEncode / KSampler
- **下游**：任何 INT 参数口
- **接线**：输出的是数值，可接到任何同类型参数口（右键参数 →「转换为输入」）；常用来把图像尺寸、视频帧数动态传给下游，避免手改参数。

## 使用案例

从 `latent` 开始填就能跑起来。典型接法：`EmptyLatentImage` → 本节点 → `任何 INT 参数口`。输出类型是 INT，只能接同类型的输入端口，颜色对不上就是接错了。

## 端口与连线示意

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