There are many closed source models, but HunyuanVideo is an open source video generation that is proved to be quite competitive in the market. Tencent released this video generative model trained with over 13 billion parameters promises to become the largest among varieties of models. You can find more in-depth understanding from their research paper.
💀HunyuanVideo 💀
— Stable Diffusion Tutorials (@SD_Tutorial) December 4, 2024
Tancent's Uncensored T2V model is here !!! 😱
Project page:https://t.co/HP9PPvshzQ
Now available in Comfy 👍
Kijai's setup is here: 👇https://t.co/noPNgZV4Ey pic.twitter.com/oivOReZSyN
The model produces professional looking videos that is capable to avoid repetitive movements, ensuring to experience the realistic motion. The video generation accurately matches textual prompting that delivers consistent outputs without glitches.
Source-HunyuanVideo's Hugging Face repository |
The researchers claimed that the HunyuanVideo outperformed the Luma1.6, Runway Gen3 and other Chinese video generation models. Lets see and test how this performs in ComfyUI.
Table of Contents:
TYPE A: Native ComfyUI Support
Now, their is a official ComfyUI support available for HunyuanVideo. But, you can only run if you have at least 24GB VRAM other wise you will stuck into out-of-memory error. Lower VRAM users can opt for the second( By Kijai) and third(GGUF)quantized variant listed below.
Installation
0. Install ComfyUI if you are a new user.
1. Old users need to Update ComfyUI from the Manager section by selecting "Update ComfyUI" option.
1. Download Hunyuan model file from Hugging face repository.
Save it into your "ComfyUI/models/diffusion_models" folder. Create new folder "diffusion_models", if you do not have.
2. Download VAE model from Hugging face and save it inside "ComfyUI/models/vae" folder.
3. Next, download the clip models (clip_l.safetensors and llava_llama3_fp8_scaled.safetensors) from Hugging face and put them into "ComfyUI/models/text_encoders" folder.
4. Restart and refresh ComfyUI.
TYPE B: Quantized variant By Kijai
Installing process
1. Install ComfyUI if you haven't done yet.
2. Older user need to choose "Update ComfyUI" option from the Manager to avoid any future errors.
3. Move into "ComfyUI/custom_node" folder and open command prompt.
Clone the ComfyUI HunyuanVideoWrapper Kijai's repository using following command:
git clone https://github.com/kijai/ComfyUI-HunyuanVideoWrapper.git
4. Download the respective quantized HunyuanVideo model from Hugging face repository.
There are multiple options to choose from. Select the one which suits your machine requirements. Here, Fp8 variant is for 12 GB and lower VRAMs, and BF16 for higher.
After downloading the models, save it into your "ComfyUI/models/diffusion_models" folder.
Also download the required VAE and save it into "ComfyUI/models/vae" folder.
5. Next is to download all text encoders and its files shown above from respective Hugging Face repository and place them into your "ComfyUI/models/LLM/llava-llama-3-8b-text-encoder-tokenizer" folder.
6. Now, download OpenAI's transformer based Clip Vit Large Model and files(illustrated above) from their Hugging face repository and put them into your "ComfyUI/models/clip/clip-vit-large-patch14" directory.
Optional(for windows users): Another point we want to mention is that you can install Triton and Sage-Attention which will significantly drop the video rendering time to almost 25% as reported by the community.
Install Windows Trition .whl file for your python version. To check python version run "python --version" (without quotes) in command prompt. We have python 3.10 version installed. For other python version checkout Windows Trition release section.
For normal ComfyUI user this is the syntax. Replace the <<your-trition-python-version>> with your relevant .whl file.
Syntax:
pip install <<your-trition-python-version>>
pip install triton-3.1.0-cp310-cp310-win_amd64.whl
Then install sage-attention:
pip install sageattention
For Comfy Portable users, move inside ComfyUI_windows_portable folder and open command prompt and use the following syntax. Replace the <<your-trition-python-version>> with your relevant .whl file.
Syntax:
.\python_embeded\python.exe -m pip install <<your-trition-python-version>>
.\python_embeded\python.exe -m pip install triton-3.1.0-cp310-cp310-win_amd64.whl
Then install sage-attention:
.\python_embeded\python.exe -m pip install sageattention
7. Restart and refresh your ComfyUI to take effect.