lance_wan22_vae / component.py
gatilin's picture
Publish pinned Lance Wan2.2 VAE with strict native component validation
d52c11d verified
Raw History Blame Contribute Delete
305 Bytes
"""Strict native loader for the Wan2.2 VAE shipped by Lance."""
from pathlib import Path
import torch
from native.vae2_2 import Wan2_2_VAE
def load_model(root, *, device='cpu', dtype=torch.float32):
root = Path(root)
return Wan2_2_VAE(vae_pth=str(root / 'model.pth'), device=device, dtype=dtype)