How to use from the
Use from the
Diffusers library
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("wavespeed/Wan2.1-I2V-14B-480P-Diffusers-fp16", 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")

Wan2.1-I2V-14B-480P-Diffusers-fp16

An fp16 cast of Wan2.1-I2V-14B-480P-Diffusers.

What was changed

Upstream ships the transformer in fp32. Here every component — transformer, UMT5 text encoder, CLIP image encoder and VAE — is stored in fp16. The transformer goes from ~65.6 GB to ~32.8 GB. Tensor names and shapes are unchanged and nothing is quantized; this is a straight dtype cast.

Usage

import torch
from diffusers import WanImageToVideoPipeline
from diffusers.utils import load_image

pipe = WanImageToVideoPipeline.from_pretrained(
    "wavespeed/Wan2.1-I2V-14B-480P-Diffusers-fp16", torch_dtype=torch.float16
).to("cuda")

frames = pipe(
    image=load_image("still.png"),
    prompt="the camera drifts slowly to the left",
    height=480, width=832, num_frames=81,
).frames[0]

License

Apache-2.0, inherited from Wan2.1.

Downloads last month
24
Safetensors
Model size
16B params
Tensor type
F32
·
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for wavespeed/Wan2.1-I2V-14B-480P-Diffusers-fp16

Quantized
(1)
this model

Collection including wavespeed/Wan2.1-I2V-14B-480P-Diffusers-fp16