8000 GitHub - Tencent-Hunyuan/HunyuanPortrait: HunyuanPortrait: Implicit Condition Control for Enhanced Portrait Animation
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Tencent-Hunyuan/HunyuanPortrait

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

HunyuanPortrait

HunyuanPortrait: Implicit Condition Control for Enhanced Portrait Animation

🧩 Community Contributions

If you develop/use HunyuanPortrait in your projects, welcome to let us know/sumbit a PR! πŸ’–

πŸ“œ Requirements

  • An NVIDIA 3090 GPU with CUDA support is required.
    • The model is tested on a single 24G GPU.
  • Tested operating system: Linux

πŸ› οΈ Installation

git clone https://github.com/Tencent-Hunyuan/HunyuanPortrait
pip3 install torch torchvision torchaudio
pip3 install -r requirements.txt

πŸ“₯ Download

All models are stored in pretrained_weights by default:

pip3 install "huggingface_hub[cli]"
cd pretrained_weights
huggingface-cli download --resume-download stabilityai/stable-video-diffusion-img2vid-xt --local-dir . --include "*.json"
wget -c https://huggingface.co/LeonJoe13/Sonic/resolve/main/yoloface_v5m.pt
wget -c https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt/resolve/main/vae/diffusion_pytorch_model.fp16.safetensors -P vae
wget -c https://huggingface.co/FoivosPar/Arc2Face/resolve/da2f1e9aa3954dad093213acfc9ae75a68da6ffd/arcface.onnx
huggingface-cli download --resume-download tencent/HunyuanPortrait --local-dir hyportrait

And the file structure is as follows:

.
β”œβ”€β”€ arcface.onnx
β”œβ”€β”€ hyportrait
β”‚   β”œβ”€β”€ dino.pth
β”‚   β”œβ”€β”€ expression.pth
β”‚   β”œβ”€β”€ headpose.pth
β”‚   β”œβ”€β”€ image_proj.pth
β”‚   β”œβ”€β”€ motion_proj.pth
β”‚   β”œβ”€β”€ pose_guider.pth
β”‚   └── unet.pth
β”œβ”€β”€ scheduler
β”‚   └── scheduler_config.json
β”œβ”€β”€ unet
β”‚   └── config.json
β”œβ”€β”€ vae
β”‚   β”œβ”€β”€ config.json
β”‚   └── diffusion_pytorch_model.fp16.safetensors
└── yoloface_v5m.pt

▢️ Run

πŸ”₯ Live your portrait by executing bash demo.sh

video_path="your_video.mp4"
image_path="your_image.png"

python inference.py \
    --config config/hunyuan-portrait.yaml \
    --video_path $video_path \
    --image_path $image_path

Or use a Gradio Server:

python gradio_app.py

πŸ—οΈ Framework

⏳ TL;DR:

HunyuanPortrait is a diffusion-based framework for generating lifelike, temporally consistent portrait animations by decoupling identity and motion using pre-trained encoders. It encodes driving video expressions/poses into implicit control signals, injects them via attention-based adapters into a stabilized diffusion backbone, enabling detailed and style-flexible animation from a single reference image. The method outperforms existing approaches in controllability and coherence.

πŸ–Ό Gallery

Some results of portrait animation using HunyuanPortrait.

More results can be found on our Project page.

πŸ“‚ Cases

f1.mp4
f2.mp4
f4.mp4
f3.mp4

🎀 Portrait Singing

sing_1.mp4

🎬 Portrait Acting

act_1.mp4

πŸ€ͺ Portrait Making Face

emoji_1.mp4

πŸ’– Acknowledgements

The code is based on SVD, DiNOv2, Arc2Face, YoloFace. We thank the authors for their open-sourced code and encourage users to cite their works when applicable. Stable Video Diffusion is licensed under the Stable Video Diffusion Research License, Copyright (c) Stability AI Ltd. All Rights Reserved. This codebase is intended solely for academic purposes.

πŸ”— Citation

If you think this project is helpful, please feel free to leave a star⭐️⭐️⭐️ and cite our paper:

@inproceedings{xu2025hunyuanportrait,
  title={Hunyuanportrait: Implicit condition control for enhanced portrait animation},
  author={Xu, Zunnan and Yu, Zhentao and Zhou, Zixiang and Zhou, Jun and Jin, Xiaoyu and Hong, Fa-Ting and Ji, Xiaozhong and Zhu, Junwei and Cai, Chengfei and Tang, Shiyu and others},
  booktitle={Proceedings of the Computer Vision and Pattern Recognition Conference},
  pages={15909--15919},
  year={2025}
}

About

HunyuanPortrait: Implicit Condition Control for Enhanced Portrait Animation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0