Instructions to use Wan-AI/Wan2.1-I2V-14B-720P with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Wan-AI/Wan2.1-I2V-14B-720P 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.1-I2V-14B-720P", 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
Getting out of memory OOM on 8x40GB setup, any solution?
#19
by apoorvumang - opened
I'm trying the multi gpu command on an 8x40GB setup and getting OOM. Is there a recommended way to fix this? Thanks!
I'm having issues with 4x 3090s. The chart from the model card indicates this should use about 41 GB, but it quickly fills every card and errors OOM.