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 export_to_video

# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("wan-ai/Wan2.1-T2V-14B-Diffusers", dtype=torch.bfloat16, device_map="cuda")
pipe.load_lora_weights("Muapi/bg3-characters-collection-for-wan-2.1-720p")

prompt = "A man with short gray hair plays a red electric guitar."

output = pipe(prompt=prompt).frames[0]
export_to_video(output, "output.mp4")

BG3 Characters Collection for Wan 2.1 720p

preview

Base model: Wan Video 14B t2v Trained words: SH4RT elf woman with long black braided hairand side bangs,, SH4RT elf woman with long black braided hairand side bangs, wearing her camp outfit, camp outfit

๐Ÿง  Usage (Python)

๐Ÿ”‘ Get your MUAPI key from muapi.ai/access-keys

import requests, os
url = "https://api.muapi.ai/api/v1/wan21_t2v"
headers = {"Content-Type": "application/json", "x-api-key": os.getenv("MUAPIAPP_API_KEY")}
payload = {
    "prompt": "masterpiece, best quality",
    "lora_model": "bg3-characters-collection-for-wan-21-720p",
    "lora_strength": 1.0,
    "width": 832,
    "height": 480,
    "num_frames": 81
}
print(requests.post(url, headers=headers, json=payload).json())
Downloads last month
6
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support