Instructions to use Wan-AI/Wan2.2-TI2V-5B-Diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Wan-AI/Wan2.2-TI2V-5B-Diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Wan-AI/Wan2.2-TI2V-5B-Diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -10,8 +10,9 @@ from diffusers.utils import export_to_video, load_image
|
|
| 10 |
dtype = torch.bfloat16
|
| 11 |
device = "cuda"
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
|
|
|
| 15 |
pipe.to(device)
|
| 16 |
|
| 17 |
height = 704
|
|
|
|
| 10 |
dtype = torch.bfloat16
|
| 11 |
device = "cuda"
|
| 12 |
|
| 13 |
+
model_id = "Wan-AI/Wan2.2-TI2V-5B-Diffusers"
|
| 14 |
+
vae = AutoencoderKLWan.from_pretrained(model_id, subfolder="vae", torch_dtype=torch.float32)
|
| 15 |
+
pipe = WanPipeline.from_pretrained(model_id, vae=vae, torch_dtype=dtype)
|
| 16 |
pipe.to(device)
|
| 17 |
|
| 18 |
height = 704
|