> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-docs-partner-nodes-consolidate.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# WanVaceToVideo - ComfyUI Built-in Node Documentation

> The WanVaceToVideo node prepares video conditioning data for video generation models.

The WanVaceToVideo node prepares video conditioning data for video generation models. It takes positive and negative conditioning inputs along with an optional control video, masks, and reference image, and encodes them into latent representations that guide video generation. The node handles upscaling, padding, masking, and VAE encoding to build the appropriate conditioning structure for video models.

## Inputs

| Parameter         | Description                                                                                                                                        | Data Type    | Required | Range                 |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -------- | --------------------- |
| `positive`        | Positive conditioning input for guiding the generation                                                                                             | CONDITIONING | Yes      | -                     |
| `negative`        | Negative conditioning input for guiding the generation                                                                                             | CONDITIONING | Yes      | -                     |
| `vae`             | VAE model used for encoding images and video frames                                                                                                | VAE          | Yes      | -                     |
| `width`           | Output video width in pixels (default: 832, step: 16)                                                                                              | INT          | Yes      | 16 to MAX\_RESOLUTION |
| `height`          | Output video height in pixels (default: 480, step: 16)                                                                                             | INT          | Yes      | 16 to MAX\_RESOLUTION |
| `length`          | Number of frames in the video (default: 81, step: 4)                                                                                               | INT          | Yes      | 1 to MAX\_RESOLUTION  |
| `batch_size`      | Number of videos to generate simultaneously (default: 1)                                                                                           | INT          | Yes      | 1 to 4096             |
| `strength`        | Condition strength for VACE control (default: 1.0, step: 0.01). This is not a LoRA strength. LoRA weights are applied through separate LoRA nodes. | FLOAT        | Yes      | 0.0 to 1000.0         |
| `control_video`   | Optional input video used for control conditioning. If not provided, a neutral gray video is created automatically.                                | IMAGE        | No       | -                     |
| `control_masks`   | Optional masks that determine which parts of the control video are active. If not provided, a full white mask is used.                             | MASK         | No       | -                     |
| `reference_image` | Optional reference image for additional conditioning. When provided, it is encoded and prepended to the latent sequence.                           | IMAGE        | No       | -                     |

**Note:** When `control_video` is provided, it is truncated to `length` frames and upscaled to the specified `width` and `height`; if it has fewer frames than `length`, the missing frames are padded with neutral gray (value 0.5). When it is not provided, a neutral gray video of `length` frames is created automatically. `control_masks` are upscaled to the specified `width` and `height`, truncated to `length` frames, and padded with value 1.0 if shorter. The mask separates the control video into inactive and reactive parts, each VAE-encoded and concatenated along the channel dimension; the mask is also downsampled to latent resolution. When `reference_image` is provided, it is VAE-encoded and prepended to the latent sequence. The latent frame count is calculated as `((length - 1) // 4) + 1`, and the latent spatial dimensions are `height / 8` and `width / 8`.

## Outputs

| Output Name   | Description                                                                                                     | Data Type    |
| ------------- | --------------------------------------------------------------------------------------------------------------- | ------------ |
| `positive`    | Positive conditioning with video control data (vace\_frames, vace\_mask, vace\_strength) applied                | CONDITIONING |
| `negative`    | Negative conditioning with video control data (vace\_frames, vace\_mask, vace\_strength) applied                | CONDITIONING |
| `latent`      | Empty latent tensor ready for video generation with shape \[batch\_size, 16, latent\_length, height/8, width/8] | LATENT       |
| `trim_latent` | Number of latent frames to trim when a reference image is used; 0 if no reference image is provided             | INT          |

> 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/WanVaceToVideo/en.md)

***

**Source fingerprint (SHA-256):** `2039b7509ce5b731e9e41d9cd2dad022d4c5004751f571a4cf88c1ba0cae405b`
