Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
H

HunyuanVideo

> 数据库
Open source

HunyuanVideo: A Systematic Framework For Large Video Generation Model

12.4K stars0 likes1 views
WebsiteGitHub

About

HunyuanVideo: A Systematic Framework For Large Video Generation Model

[中文阅读](./README_zh.md)

# HunyuanVideo: A Systematic Framework For Large Video Generation Model

Join our WeChat and Discord

----- This repo contains PyTorch model definitions, pre-trained weights and inference/sampling code for our paper exploring HunyuanVideo. You can find more visualizations on our [project page](https://aivideo.hunyuan.tencent.com). > [**HunyuanVideo: A Systematic Framework For Large Video Generation Model**](https://arxiv.org/abs/2412.03603) ## News!! * Nov 21, 2025: We release the [HunyuanVideo-1.5](https://github.com/Tencent-Hunyuan/HunyuanVideo-1.5), a highly efficient and powerful new foundation model. * May 28, 2025: We release the [HunyuanVideo-Avatar](https://github.com/Tencent-Hunyuan/HunyuanVideo-Avatar), an audio-driven human animation model based on HunyuanVideo. * May 09, 2025: We release the [HunyuanCustom](https://github.com/Tencent-Hunyuan/HunyuanCustom), a multimodal-driven architecture for customized video generation based on HunyuanVideo. * Mar 06, 2025: We release the [HunyuanVideo-I2V](https://github.com/Tencent-Hunyuan/HunyuanVideo-I2V), an image-to-video model based on HunyuanVideo. * Jan 13, 2025: We release the [Penguin Video Benchmark](https://github.com/Tencent-Hunyuan/HunyuanVideo/blob/main/assets/PenguinVideoBenchmark.csv). * Dec 18, 2024: ‍♂️ We release the [FP8 model weights](https://huggingface.co/tencent/HunyuanVideo/blob/main/hunyuan-video-t2v-720p/transformers/mp_rank_00_model_states_fp8.pt) of HunyuanVideo to save more GPU memory. * Dec 17, 2024: HunyuanVideo has been integrated into [Diffusers](https://huggingface.co/docs/diffusers/main/api/pipelines/hunyuan_video). * Dec 7, 2024: We release the parallel inference code for HunyuanVideo powered by [xDiT](https://github.com/xdit-project/xDiT). * Dec 3, 2024: We release the inference code and model weights of HunyuanVideo. [Download](https://github.com/Tencent-Hunyuan/HunyuanVideo/blob/main/ckpts/README.md). ## Demo ## Community Contributions If you develop/use HunyuanVideo in your projects, welcome to let us know. - ComfyUI-Kijai (FP8 Inference, V2V and IP2V Generation): [ComfyUI-HunyuanVideoWrapper](https://github.com/kijai/ComfyUI-HunyuanVideoWrapper) by [Kijai](https://github.com/kijai) - ComfyUI-Native (Native Support): [ComfyUI-HunyuanVideo](https://comfyanonymous.github.io/ComfyUI_examples/hunyuan_video/) by [ComfyUI Official](https://github.com/comfyanonymous/ComfyUI) - FastVideo (Consistency Distilled Model and Sliding Tile Attention): [FastVideo](https://github.com/hao-ai-lab/FastVideo) and [Sliding Tile Attention](https://hao-ai-lab.github.io/blogs/sta/) by [Hao AI Lab](https://hao-ai-lab.github.io/) - HunyuanVideo-gguf (GGUF Version and Quantization): [HunyuanVideo-gguf](https://huggingface.co/city96/HunyuanVideo-gguf) by [city96](https://huggingface.co/city96) - Enhance-A-Video (Better Generated Video for Free): [Enhance-A-Video](https://github.com/NUS-HPC-AI-Lab/Enhance-A-Video) by [NUS-HPC-AI-Lab](https://ai.comp.nus.edu.sg/) - TeaCache (Cache-based Accelerate): [TeaCache](https://github.com/LiewFeng/TeaCache) by [Feng Liu](https://github.com/LiewFeng) - HunyuanVideoGP (GPU Poor version): [HunyuanVideoGP](https://github.com/deepbeepmeep/HunyuanVideoGP) by [DeepBeepMeep](https://github.com/deepbeepmeep) - RIFLEx (Video Length Extrapolation): [RIFLEx](https://riflex-video.github.io/) by [Tsinghua University](https://riflex-video.github.io/) - HunyuanVideo Keyframe Control Lora: [hunyuan-video-keyframe-control-lora](https://github.com/dashtoon/hunyuan-video-keyframe-control-lora) by [dashtoon](https://github.com/dashtoon) - Sparse-VideoGen (Accelerate Video Generation with High Pixel-level Fidelity): [Sparse-VideoGen](https://github.com/svg-project/Sparse-VideoGen) by [University of California, Berkeley](https://svg-project.github.io/) - FramePack (Packing Input Frame Context in Next-Frame Prediction Models for Video Generation): [FramePack](https://github.com/lllyasviel/FramePack) by [Lvmin Zhang](https://github.com/lllyasviel) - Jenga (Training-Free Efficient Video Generation via Dynamic Token Carving): [Jenga](https://github.com/dvlab-research/Jenga) by [DV Lab](https://github.com/dvlab-research) - DCM (Dual-Expert Consistency Model for Efficient and High-Quality Video Generation): [DCM](https://github.com/Vchitect/DCM) by [Vchitect](https://github.com/Vchitect/DCM) - NaviCache (Offline Calibration-free Cache-based Accelerate): [NaviCache](https://github.com/HelloZicky/NaviCache) by [Zhejiang University](https://arxiv.org/abs/2606.26795) ## Open-source Plan - HunyuanVideo (Text-to-Video Model) - [x] Inference - [x] Checkpoints - [x] Multi-gpus Sequence Parallel inference (Faster inference speed on more gpus) - [x] Web Demo (Gradio) - [x] Diffusers - [x] FP8 Quantified weight - [x] Penguin Video Benchmark - [x] ComfyUI - [HunyuanVideo (Image-to-Video Model)](https://github.com/Tencent/HunyuanVideo-I2V) - [X] Inference - [X] Checkpoints ## Contents - [HunyuanVideo: A Systematic Framework For Large Video Generation Model](#hunyuanvideo-a-systematic-framework-for-large-video-generation-model) - [ Demo](#-demo) - [ News!!](#-news) - [ Community Contributions](#-community-contributions) - [ Open-source Plan](#-open-source-plan) - [Contents](#contents) - [**Abstract**](#abstract) - [**HunyuanVideo Overall Architecture**](#hunyuanvideo-overall-architecture) - [ **HunyuanVideo Key Features**](#-hunyuanvideo-key-features) - [**Unified Image and Video Generative Architecture**](#unified-image-and-video-generative-architecture) - [**MLLM Text Encoder**](#mllm-text-encoder) - [**3D VAE**](#3d-vae) - [**Prompt Rewrite**](#prompt-rewrite) - [ Comparisons](#-comparisons) - [ Requirements](#-requirements) - [️ Dependencies and Installation](#️-dependencies-and-installation) - [Installation Guide for Linux](#installation-guide-for-linux) - [ Download Pretrained Models](#-download-pretrained-models) - [ Single-gpu Inference](#-single-gpu-inference) - [Using Command Line](#using-command-line) - [Run a Gradio Server](#run-a-gradio-server) - [More Configurations](#more-configurations) - [ Parallel Inference on Multiple GPUs by xDiT](#-parallel-inference-on-multiple-gpus-by-xdit) - [Using Command Line](#using-command-line-1) - [ FP8 Inference](#--fp8-inference) - [Using Command Line](#using-command-line-2) - [ BibTeX](#-bibtex) - [Acknowledgements](#acknowledgements) - [Star History](#star-history) --- ## **Abstract** We present HunyuanVideo, a novel open-source video foundation model that exhibits performance in video generation that is comparable to, if not superior to, leading closed-source models. In order to train HunyuanVideo model, we adopt several key technologies for model learning, including data curation, image-video joint model training, and an efficient infrastructure designed to facilitate large-scale model training and inference. Additionally, through an effective strategy for scaling model architecture and dataset, we successfully trained a video generative model with over 13 billion parameters, making it the largest among all open-source models. We conducted extensive experiments and implemented a series of targeted designs to ensure high visual quality, motion diversity, text-video alignment, and generation stability. According to professional human evaluation results, HunyuanVideo outperforms previous state-of-the-art models, including Runway Gen-3, Luma 1.6, and 3 top-performing Chinese video generative models. By releasing the code and weights of the foundation model and its applications, we aim to bridge the gap between closed-source and open-source video foundation models. This initiative will empower everyone in the community to experiment with their ideas, fostering a more dynamic and vibrant video generation ecosystem. ## **HunyuanVideo Overall Architecture** HunyuanVideo is trained on a spatial-temporally compressed latent space, which is compressed through a Causal 3D VAE. Text prompts are encoded using a large language model, and used as the conditions. Taking Gaussian noise and the conditions as input, our generative model produces an output latent, which is then decoded to images or videos through the 3D VAE decoder.

## **HunyuanVideo Key Features** ### **Unified Image and Video Generative Architecture** HunyuanVideo introduces the Transformer design and employs a Full Attention mechanism for unified image and video generation. Specifically, we use a "Dual-stream to Single-stream" hybrid model design for video generation. In the dual-stream phase, video and text tokens are processed independently through multiple Transformer blocks, enabling each modality to learn its own appropriate modulation mechanisms without interference. In the single-stream phase, we concatenate the video and text tokens and feed them into subsequent Transformer blocks for effective multimodal information fusion. This design captures complex interactions between visual and semantic information, enhancing overall model performance.

### **MLLM Text Encoder** Some previous text-to-video models typically use pre-trained CLIP and T5-XXL as text encoders where CLIP uses Transformer Encoder and T5 uses an Encoder-Decoder structure. In contrast, we utilize a pre-trained Multimodal Large Language Model (MLLM) with a Decoder-Only structure as our text encoder, which has the following advantages: (i) Compared with T5, MLLM after visual instruction finetuning has better image-text alignment in the feature space, which alleviates the difficulty of the instruction following in diffusion models; (ii) Compared with CLIP, MLLM has demonstrated superior ability in image detail description and complex reasoning; (iii) MLLM can play as a zero-shot learner by following system instructions prepended to user prompts, helping text features pay more attention to key information. In addition, MLLM is based on causal attention while T5-XXL utilizes bidirectional attention that produces better text guidance for diffusion models. Therefore, we introduce an extra bidirectional token refiner to enhance text features.

### **3D VAE** HunyuanVideo trains a 3D VAE with CausalConv3D to compress pixel-space videos and images into a compact latent space. We set the compression ratios of video length, space, and channel to 4, 8, and 16 respectively. This can significantly reduce the number of tokens for the subsequent diffusion transformer model, allowing us to train videos at the original resolution and frame rate.

### **Prompt Rewrite** To address the variability in linguistic style and length of user-provided prompts, we fine-tune the [Hunyuan-Large model](https://github.com/Tencent/Tencent-Hunyuan-Large) as our prompt rewrite model to adapt the original user prompt to model-preferred prompt. We provide two rewrite modes: Normal mode and Master mode, which can be called using different prompts. The prompts are shown [here](hyvideo/prompt_rewrite.py). The Normal mode is designed to enhance the video generation model's comprehension of user intent, facilitating a more accurate interpretation of the instructions provided. The Master mode enhances the description of aspects such as composition, lighting, and camera movement, which leans towards generating videos with a higher visual quality. However, this emphasis may occasionally result in the loss of some semantic details. The Prompt Rewrite Model can be directly deployed and inferred using the [Hunyuan-Large original code](https://github.com/Tencent/Tencent-Hun

Issues· 185 open

View all issuesOpen on GitHub
  • #332

    Move

    Updated Sep 10, 2026
  • #223

    192 Frame Limit (Bug and Proposed Fix)

    Updated Sep 4, 2026
  • #323

    Broken "Try It Now" button on the Hunyuan Video website

    Updated Aug 23, 2026
  • #324

    Make vedio

    Updated Aug 5, 2026
  • #327

    فیلم تبلیغا تی

    Updated Aug 3, 2026
  • #326

    No funciona el botón de iniciar ahora

    Updated Aug 2, 2026
  • #325

    一分の動画作成

    Updated Jul 25, 2026
  • #304

    python -m pip install "huggingface_hub[cli]"

    Updated Jul 16, 2026
  • #322

    İn the club

    Updated Jun 22, 2026
  • #321

    DreamX-World: A General-Purpose Interactive World Model

    Updated Jun 18, 2026

> Tags

Pythondiffusion-modelsdiffusion-transformervideo-generation

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 28, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库