HunyuanVideo Encode Keyframes To Cond(HunyuanVideoEncodeKeyframesToCond)
This node receives image inputs for the start and end frames and encodes them into the latent space via the specified Variational Autoencoder (VAE).
Hunyuan Video Encode Keyframes To Cond
The HunyuanVideo Encode Keyframes To Cond node receives image inputs for the start and end frames and encodes them into the latent space using a specified Variational Autoencoder (VAE).
HunyuanVideo Encode Keyframes To Cond is a node specifically designed for video generation workflows. Its core function is to process the start and end frames, encode them into latent space representations, and generate conditioning information to guide the video model. This node aims to provide the initial visual and conditional foundation for generating video sequences.
Node Functionality
This node receives image inputs for the start and end frames and encodes them into the latent space using a specified Variational Autoencoder (VAE). It supports tiled encoding for handling high-resolution images and allows setting the encoding block size and overlap on the temporal dimension, which is particularly important for processing video VAEs. The node outputs a modified model, positive and negative conditioning information, and a LATENT object containing the encoded latent representation.
Node Parameter Description - HunyuanVideo Encode Keyframes To Cond
Connection Inputs (Inputs)
| Parameter Name | Data Type | Required | Default Value | Range/Options | Description |
|---|---|---|---|---|---|
model | MODEL | Yes | - | - | model (Input Parameter): The model used for video generation. |
positive | CONDITIONING | Yes | - | - | positive (Input Parameter): Positive conditioning information to guide the generation. |
vae | VAE | Yes | - | - | vae (Input Parameter): Input the Variational Autoencoder used to encode images into the latent space. |
start_frame | IMAGE | Yes | - | - | start_frame (Input Parameter): Input the start keyframe image for the video sequence. |
end_frame | IMAGE | Yes | - | - | end_frame (Input Parameter): Input the end keyframe image for the video sequence. |
negative | CONDITIONING | No | - | - | negative (Input Parameter): Optional negative conditioning information. |
Control Parameters (Parameters)
| Parameter Name | Data Type | Required | Default Value | Range/Options | Description |
|---|---|---|---|---|---|
num_frames | INT | Yes | 33 | 2 - 4096 (Step: 1) | num_frames (Input Parameter): Specifies the total number of frames to generate. Range is 2 to 4096 with a step of 1. |
tile_size | INT | Yes | 512 | 64 - 4096 (Step: 64) | tile_size (Input Parameter): Sets the size of each tile for tiled image encoding. Range is 64 to 4096 with a step of 64. |
overlap | INT | Yes | 64 | 0 - 4096 (Step: 32) | overlap (Input Parameter): Sets the number of overlapping pixels between tiles during tiled image encoding. Range is 0 to 4096 with a step of 32. |
temporal_size | INT | Yes | 64 | 8 - 4096 (Step: 4) | Only used for video VAEs: Amount of frames to encode at a time. |
temporal_overlap | INT | Yes | 8 | 4 - 4096 (Step: 4) | Only used for video VAEs: Amount of frames to overlap. |
Output
| Parameter Name | Data Type | Description |
|---|---|---|
| model | MODEL | model (Output Parameter): Outputs the modified model ready to receive keyframe conditions. |
| positive | CONDITIONING | positive (Output Parameter): Outputs the processed positive conditioning information. |
| negative | CONDITIONING | negative (Output Parameter): Outputs the processed negative conditioning information. |
| latent | LATENT | latent (Output Parameter): Outputs the latent space representation encoded from the start and end frames. |
Usage Scenarios
In workflows for video interpolation or generating video sequences from keyframes, users can place this node after the model loading node. By connecting the start and end keyframe images and setting the total number of frames, this node prepares the necessary conditional inputs and initial latent state for the subsequent video generation model, thereby guiding the model to generate coherent intermediate frames.
Notes
This node has requirements for input image dimensions and will automatically adjust them to multiples of 8. The temporal_size and temporal_overlap parameters only take effect when the VAE used is a video VAE, controlling the encoding method on the temporal dimension.
HunyuanVideo Encode Keyframes To Cond Node Source Code Link
The HunyuanVideo Encode Keyframes To Cond node is from the ComfyUI-KJNodes node package.
Comments
Sign in with GitHub to join the discussion.