Instructions to use 0xpabloli/Wan2.2-S2V-14B-NPU with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Wan2.2
How to use 0xpabloli/Wan2.2-S2V-14B-NPU with Wan2.2:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Wan2.2-S2V-14B NPU 910B Support
NPU 910B (Huawei Ascend) adaptation for Wan2.2-S2V-14B, enabling free inference on platforms like AtomGit which provide NPU 910B 64GB instances at no cost.
Why
Wan2.2-S2V-14B is a powerful audio-to-video (talking body) model, but it requires significant GPU memory. On NPU 910B (32GB HBM + CPU offload), we can run it for free with staged loading and device_map='auto'.
Results
| Configuration | Value |
|---|---|
| Hardware | NPU 910B 64GB (AtomGit free tier) |
| Resolution | 480ร832 |
| Steps | 5 |
| Frames | 40 |
| Inference time | ~550s (9.2 min) |
| Core-hours | ~2.47 |
| Cost | Free |
| Quality | AI-rated 8.5/10 |
Quick Start
# 1. Clone Wan2.2
git clone https://github.com/Wan-Video/Wan2.2.git
cd Wan2.2
# 2. Download this patch
wget https://huggingface.co/0xpabloli/Wan2.2-S2V-14B-NPU/resolve/main/patch_npu.py
# 3. Apply NPU patches
python patch_npu.py --repo-root . --max-memory 15GB
# 4. Download model
python -c "from modelscope import snapshot_download; snapshot_download('Wan-AI/Wan2.2-S2V-14B', local_dir='./Wan2.2-S2V-14B')"
# 5. Run inference
python generate.py \
--task s2v-14B \
--size 480*832 \
--ckpt_dir ./Wan2.2-S2V-14B \
--offload_model True \
--sample_steps 5 \
--num_clip 1 \
--frame_num 40 \
--prompt "A person is talking to camera" \
--image portrait.jpg \
--audio audio.wav \
--save_file output.mp4
Files
patch_npu.pyโ NPU 910B patch script (10 patches, idempotent)NPU_SUPPORT.mdโ Full documentation with setup instructions
Patches
torch.cuda.*โtorch.npu.*mapping +import torch_npu- NCCL โ HCCL distributed backend
- Staged loading: release T5 encoder before loading diffusion model
device_map='auto'for automatic HBM/CPU offload- Skip
.to(device)/.cpu()for accelerate-managed models flash_attentionโ SDPA fallback- VAE dtype fix
- dtype assert โ
.float()cast max_memorytuning (15GB HBM + 60GB CPU)empty_cache()before VAE decode
Related
- Official repo: Wan-Video/Wan2.2
- PR: #385
- AtomGit mirror: gcw_GGihkrEm/Wan2.2-S2V-14B-NPU
Author
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support