Instructions to use Wan-AI/Wan2.2-I2V-A14B-Diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Wan-AI/Wan2.2-I2V-A14B-Diffusers 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("Wan-AI/Wan2.2-I2V-A14B-Diffusers", 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") - Inference
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -149,6 +149,7 @@ DASH_API_KEY=your_key torchrun --nproc_per_node=8 generate.py --task i2v-A14B --
|
|
| 149 |
> The process of prompt extension can be referenced [here](#2-using-prompt-extention).
|
| 150 |
|
| 151 |
- Running with Diffusers
|
|
|
|
| 152 |
```py
|
| 153 |
import torch
|
| 154 |
import numpy as np
|
|
@@ -190,7 +191,11 @@ output = pipe(
|
|
| 190 |
export_to_video(output, "i2v_output.mp4", fps=16)
|
| 191 |
```
|
| 192 |
|
| 193 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 194 |
|
| 195 |
## Computational Efficiency on Different GPUs
|
| 196 |
|
|
|
|
| 149 |
> The process of prompt extension can be referenced [here](#2-using-prompt-extention).
|
| 150 |
|
| 151 |
- Running with Diffusers
|
| 152 |
+
|
| 153 |
```py
|
| 154 |
import torch
|
| 155 |
import numpy as np
|
|
|
|
| 191 |
export_to_video(output, "i2v_output.mp4", fps=16)
|
| 192 |
```
|
| 193 |
|
| 194 |
+
> 💡**Note**:This model requires features that are currently available only in the main branch of diffusers. The latest stable release on PyPI does not yet include these updates.
|
| 195 |
+
> To use this model, please install the library from source:
|
| 196 |
+
> ```
|
| 197 |
+
> pip install git+https://github.com/huggingface/diffusers
|
| 198 |
+
> ```
|
| 199 |
|
| 200 |
## Computational Efficiency on Different GPUs
|
| 201 |
|