Instructions to use bigfacing/HY-Video-Avatar2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use bigfacing/HY-Video-Avatar2 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image, export_to_video # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("bigfacing/HY-Video-Avatar2", dtype=torch.bfloat16, device_map="cuda") pipe.to("cuda") prompt = "A man with short gray hair plays a red electric guitar." image = load_image( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png" ) output = pipe(image=image, prompt=prompt).frames[0] export_to_video(output, "output.mp4") - Notebooks
- Google Colab
- Kaggle
| library_name: diffusers | |
| pipeline_tag: image-to-video | |
| license: other | |
| tags: | |
| - video-generation | |
| - audio-driven-animation | |
| - avatar | |
| - wan | |
| - safetensors | |
| # HY-Video-Avatar2 checkpoints | |
| This repository contains experimental `WanModelAudio` transformer checkpoints for HY-Video-Avatar2. | |
| ## Checkpoints | |
| | Directory | Description inferred from run name | | |
| | --- | --- | | |
| | `1229_fsdp_high_ct2_4800` | High-noise CT2 checkpoint | | |
| | `0104_fsdp_low_ct2_600` | Low-noise CT2 checkpoint | | |
| | `0115_fs3_emo_1_2600` | Emotion-focused checkpoint | | |
| | `0120_fs10_motion_6_1200` | Motion-focused checkpoint | | |
| | `0128_fs10_balanced_4_600` | Balanced checkpoint | | |
| | `0129_fs3_balanced_1_1200` | Balanced checkpoint | | |
| | `0202/ckpt/high_model` | High-noise model checkpoint | | |
| | `0202/ckpt/low_model` | Distilled low-noise model checkpoint | | |
| Each checkpoint directory contains: | |
| - `config.json`: `WanModelAudio` architecture configuration. | |
| - `diffusion_pytorch_model.safetensors`: transformer weights. | |
| ## Loading | |
| Use the custom `WanModelAudio` implementation from the HY-Video-Avatar2 codebase and point `from_pretrained` at one checkpoint directory, for example: | |
| ```python | |
| from infer.wan.modules.model_audio import WanModelAudio | |
| model = WanModelAudio.from_pretrained( | |
| "bigfacing/HY-Video-Avatar2", | |
| subfolder="0129_fs3_balanced_1_1200", | |
| ) | |
| ``` | |
| These are transformer-only checkpoints; the remaining inference components and configuration must be supplied by the HY-Video-Avatar2 codebase. | |
| ## Notes | |
| - Checkpoint names are preserved from the original training runs for reproducibility. | |
| - The descriptions above are inferred from those run names. | |
| - Intended for research use; evaluate outputs, identity handling, consent, and applicable rights before deployment. | |