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
error encountered when generating 1280*720 video
#5
by baoang - opened
I encounter the following error when I try to generate a 1280 * 720 video. the error can be reproduced whether I use the T2V mode or the TI2V mode.
the diffusers version is 0.35.1
anyone can help with this?
from user code:
File "/usr/local/lib/python3.10/site-packages/diffusers/models/transformers/transformer_wan.py", line 478, in forward
norm_hidden_states = (self.norm1(hidden_states.float()) * (1 + scale_msa) + shift_msa).type_as(hidden_states)
you should set
height = 704
width = 1280
output = pipe(
prompt=prompt,
negative_prompt=negative_prompt,
height=height,
width=width,...)
because 704 / 32 = 22 is integer, but 720/ 32 = 22.5
