Skip to main content
The WanFirstLastFrameToVideo node prepares conditioning for video generation by combining a start frame and an end frame with text prompts. It encodes the frame images into latent space, creates a mask that tells the video model which frames are already known, and attaches CLIP vision features when they are provided. The node outputs updated positive and negative conditioning plus an empty latent that defines the size and length of the video to generate.

Inputs

Note: When at least one of start_image or end_image is provided, the node builds a combined frame sequence where the start and end frames are filled in and the remaining frames use a neutral gray placeholder (0.5). A mask marks the filled regions as known and the placeholder regions as unknown, allowing the video model to generate the in-between frames. When a start image is provided, the known region also extends 3 extra frames beyond the image. The same encoded frame image and mask are attached to both positive and negative conditioning. If both CLIP vision inputs are provided, their hidden states are concatenated; if only one is provided, it is used on its own. The latent video length is derived from length after temporal compression: ((length - 1) // 4) + 1.

Outputs

This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub

Source fingerprint (SHA-256): 0072e441cb80334c3c961d1bbf2d081c78bc38ed1eacca840c577a2d01b36f05