Instructions to use wangkanai/wan22-fp8-i2v with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use wangkanai/wan22-fp8-i2v 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("wangkanai/wan22-fp8-i2v", 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") - Notebooks
- Google Colab
- Kaggle
How to load both high and low noise model?
#1
by mkulshre - opened
I'm following the instructions for "Image-to-Video Generation (FP8)", but that only loads the high noise weights with
pipe.unet.from_single_file(
"E:/huggingface/wan22-fp8-i2v/diffusion_models/wan/wan22-i2v-14b-fp8-high-scaled.safetensors"
)
What attribute do I replace (instead of unet) for the low noise model?
When I look at other Wan docs, they use WanImageToVideoPipeline and WanTransformer3DModel to load transformer for high noise and transformer_2 for low noise but that gives me other errors entirely...