> ## 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.

# Wan22ImageToVideoLatent - ComfyUI Built-in Node Documentation

> Wan22ImageToVideoLatent creates video latent representations from images.

Wan22ImageToVideoLatent creates video latent representations from images. It generates a blank video latent space with the specified width, height, frame length, and batch size, and can optionally encode a starting image sequence into the beginning frames. When a start image is provided, the node encodes it into the latent space and creates a corresponding noise mask that marks which regions should be denoised during generation.

## Inputs

| Parameter | Description | Data Type | Required | Range |
| - | - | - | - | - |
| `vae` | The VAE model used to encode the start image into latent space | VAE | Yes | - |
| `width` | The width of the output video in pixels (default: 1280, step: 32) | INT | Yes | 32 to MAX\_RESOLUTION |
| `height` | The height of the output video in pixels (default: 704, step: 32) | INT | Yes | 32 to MAX\_RESOLUTION |
| `length` | The number of frames in the video sequence (default: 49, step: 4) | INT | Yes | 1 to MAX\_RESOLUTION |
| `batch_size` | The number of video latents to generate (default: 1) | INT | Yes | 1 to 4096 |
| `start_image` | Optional starting image sequence to encode into the beginning frames of the video latent (uses the first `length` frames) | IMAGE | No | - |

**Note:** When `start_image` is provided, the image sequence is upscaled to the target `width` and `height`, encoded with the VAE, and placed into the first frames of the latent. The noise mask for those frames is set to 0 (preserved), while the remaining frames have a mask value of 1 (to be denoised). The latent always has 48 channels, spatial dimensions of `height / 16` by `width / 16`, and a temporal dimension of `((length - 1) // 4) + 1`. `width` and `height` must be divisible by 16 (enforced by the step of 32), and `length` increases the temporal dimension in steps of 4.

When `start_image` is not provided, a fully blank latent is returned with no noise mask, and the `batch_size` input is not applied to that blank latent.

## Outputs

| Output Name | Description | Data Type |
| - | - | - |
| `samples` | The generated video latent representation, repeated for each item in the batch | LATENT |
| `noise_mask` | The noise mask indicating which regions should be denoised (value 1) and which retain the encoded start image (value 0) | LATENT |

Both fields are returned together inside a single LATENT output.

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

***

**Source fingerprint (SHA-256):** `3d05980641eeef2e86df7a845aa8b2bd703882db98fe71adef2746ab34a9d717`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.