> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# ReplaceVideoLatentFrames - ComfyUI Built-in Node Documentation

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

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/ReplaceVideoLatentFrames/en.md)

The ReplaceVideoLatentFrames node inserts frames from a source latent video into a destination latent video, starting at a specified frame index. If the source latent is not provided, the destination latent is returned unchanged. The node handles negative indexing and will issue a warning if the source frames do not fit within the destination.

## Inputs

| Parameter     | Data Type | Required | Range                               | Description                                                                                                                                               |
| ------------- | --------- | -------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `destination` | LATENT    | Yes      | -                                   | The destination latent where frames will be replaced.                                                                                                     |
| `source`      | LATENT    | No       | -                                   | The source latent providing frames to insert into the destination latent. If not provided, the destination latent is returned unchanged.                  |
| `index`       | INT       | No       | -MAX\_RESOLUTION to MAX\_RESOLUTION | The starting latent frame index in the destination latent where the source latent frames will be placed. Negative values count from the end (default: 0). |

**Constraints:**

* The `index` must be within the bounds of the destination latent's frame count. If it is not, a warning is logged and the destination is returned unchanged.
* The source latent frames must fit within the destination latent frames starting from the specified `index`. If they do not, a warning is logged and the destination is returned unchanged.

## Outputs

| Output Name | Data Type | Description                                                       |
| ----------- | --------- | ----------------------------------------------------------------- |
| `output`    | LATENT    | The resulting latent video after the frame replacement operation. |
