Instructions to use Wan-AI/Wan2.2-T2V-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-T2V-A14B-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-T2V-A14B-Diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
how to set offload_model True with diffusers
#5
by zhaooooooo - opened
A100-SXM-80GB
720*1280
error:OOM
error happens below:
video = self.vae.decode(latents, return_dict=False)[0]
you can do this
pipe = WanPipeline.from_pretrained("Wan-AI/Wan2.2-T2V-A14B-Diffusers", vae=vae, torch_dtype=dtype)
pipe.enable_model_cpu_offload(device)
Thanks! This trick works!
Is that running in Zerogpu?