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
module errors ? evern after modlue is dawnloaded
~ cd Wan2.1
⚡ main ~/Wan2.1 python generate.py --task i2v-14B --size "1280*720" --ckpt_dir ./Wan2.1-I2V-14B-720P --image examples/i2v_input.JPG --prompt "S
ummer beach vacation style, a white cat wearing sunglasses sits on a surfboard. The fluffy-furred feline gazes directly at the camera with a rel
axed expression. Blurred beach scenery forms the background featuring crystal-clear waters, distant green hills, and a blue sky dotted with whit
e clouds. The cat assumes a naturally relaxed posture, as if savoring the sea breeze and warm sunlight. A close-up shot highlights the feline's
intricate details and the refreshing atmosphere of the seaside."
Traceback (most recent call last):
File "/teamspace/studios/this_studio/Wan2.1/generate.py", line 17, in
import wan
File "/teamspace/studios/this_studio/Wan2.1/wan/init.py", line 1, in
from . import configs, distributed, modules
File "/teamspace/studios/this_studio/Wan2.1/wan/modules/init.py", line 3, in
from .t5 import T5Decoder, T5Encoder, T5EncoderModel, T5Model
File "/teamspace/studios/this_studio/Wan2.1/wan/modules/t5.py", line 10, in
from .tokenizers import HuggingfaceTokenizer
File "/teamspace/studios/this_studio/Wan2.1/wan/modules/tokenizers.py", line 5, in
import ftfy
ModuleNotFoundError: No module named 'ftfy'
⚡ main ~/Wan2.1