Instructions to use Gjm1234/Wan2.2-I2V-A14B-Diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Gjm1234/Wan2.2-I2V-A14B-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("Gjm1234/Wan2.2-I2V-A14B-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
File size: 413 Bytes
e8ee465 471e7be cc9a515 463b1bd e8ee465 b0d6809 463b1bd e1aac6c cc9a515 463b1bd | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | import torch
from diffusers import DiffusionPipeline
class EndpointHandler:
def __init__(self, model_dir):
self.pipe = DiffusionPipeline.from_pretrained(
model_dir,
custom_pipeline="pipeline_wan_i2v",
torch_dtype=torch.float16
).to("cuda")
def __call__(self, data):
image = data["image"]
output = self.pipe(image)
return output |