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

# 替换视频Latent（ReplaceVideoLatentFrames）

<div class="node-meta"><code>ReplaceVideoLatentFrames</code><span>model/latent/batch</span><span>角色：潜空间处理</span></div>

ReplaceVideoLatentFrames 会用源潜在视频中的帧替换目标潜在视频中的一段帧范围，从指定的帧索引开始。如果未提供源潜在变量，则目标潜在变量将原样返回。该节点支持负索引，并在源帧无法放入目标时记录警告。

## 参数

| 参数            | 类型           | 默认 / 范围         | 说明           |
| ------------- | ------------ | --------------- | ------------ |
| `destination` | LATENT · 潜空间 | —（连线输入）         | 被粘贴/裁剪的底图。   |
| `index`       | INT          | -16384 \~ 16384 | 从 0 开始的位置编号。 |
| `source`（选填）  | LATENT · 潜空间 | —（连线输入）         | 提供内容的一方。     |

## 输出

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

## 怎么接

- **上游**：EmptyLatentImage / VAEEncode / KSampler
- **下游**：VAEDecode / 下一段采样
- **接线**：接在 EmptyLatentImage / VAEEncode / 上一次采样之后，输出接着进 KSampler 或 VAEDecode；潜空间操作比像素空间快得多，放大和拼接优先在这一层做。

## 使用案例

属于「潜空间处理」类节点，向下游提供潜空间数据，通常进采样器或解码器。从 `destination`、`index`（0） 开始填就能跑起来。典型接法：`EmptyLatentImage` → 本节点 → `VAEDecode`。输出类型是 LATENT，只能接同类型的输入端口，颜色对不上就是接错了。

## 端口与连线示意

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

## 同类节点

[组合Latent批次](/nodes/04/LatentBatch.md) · [从批次获取Latent](/nodes/04/LatentFromBatch.md) · [复制Latent批次](/nodes/04/RepeatLatentBatch.md) · [批量latent](/nodes/04/BatchLatentsNode.md) · [重设Latent批次](/nodes/04/RebatchLatents.md)
