HunyuanVideo Keyframe Control Lora is an adapter for HunyuanVideo T2V model for keyframe-based video generation. ​Our architecture builds upon existing models, introducing key enhancements to optimize keyframe-based video generation:​

  • We modify the input patch embedding projection layer to effectively incorporate keyframe information. By adjusting the convolutional input parameters, we enable the model to process image inputs within the Diffusion Transformer (DiT) framework.​
  • We apply Low-Rank Adaptation (LoRA) across all linear layers and the convolutional input layer. This approach facilitates efficient fine-tuning by introducing low-rank matrices that approximate the weight updates, thereby preserving the base model's foundational capabilities while reducing the number of trainable parameters.
  • The model is conditioned on user-defined keyframes, allowing precise control over the generated video's start and end frames. This conditioning ensures that the generated content aligns seamlessly with the specified keyframes, enhancing the coherence and narrative flow of the video.​
Image 1 Image 2 Generated Video
Image 1 Image 2
Image 1 Image 2
Image 1 Image 2
Image 1 Image 2

Code:

The tranining code can be found here.

Recommended Settings

  1. The model works best on human subjects. Single subject images work slightly better.
  2. It is recommended to use the following image generation resolutions 720x1280, 544x960, 1280x720, 960x544.
  3. It is recommended to set frames from 33 upto 97. Can go upto 121 frames as well (but not tested much).
  4. Prompting helps a lot but works even without. The prompt can be as simple as just the name of the object you want to generate or can be detailed.
  5. num_inference_steps is recommended to be 50, but for fast results you can use 30 as well. Anything less than 30 is not recommended.

Diffusers

HunyuanVideo Keyframe Control Lora can be used directly from Diffusers. Install the latest version of Diffusers.

Inference

While the included inference.py script can be used to run inference. We would encourage folks to visit out github repo which contains a much optimized version of this inference script.

Downloads last month
0
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The model has no pipeline_tag.

Model tree for dashtoon/hunyuan-video-keyframe-control-lora

Finetuned
(21)
this model