Instructions to use gatilin/lance_wan22_vae with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Wan2.2
How to use gatilin/lance_wan22_vae with Wan2.2:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Wan2.2 VAE distributed with Lance
This package preserves the official Wan2.2_VAE.pth artifact released with Lance, plus the exact bounded native VAE implementation. It exposes video encode/decode operations with a 48-channel latent representation. It does not include Lance's language/MoT backbone, image/video flow modules, prompts, or a full generation pipeline.
Provenance
- Weights: bytedance-research/Lance at fixed revision
7395315758865e6f56ab87ad06a88c7ac172f056, fileWan2.2_VAE.pth. - Native implementation: bytedance/Lance at fixed revision
4baeee086648996f6ab12e673cbe461b0b149997. - License: Apache-2.0. The vendored source retains upstream copyright notices for ByteDance and the Alibaba Wan team.
Load
from huggingface_hub import snapshot_download
import sys, torch
root = snapshot_download("gatilin/lance_wan22_vae")
sys.path.insert(0, root)
from component import load_model
vae = load_model(root, device="cpu", dtype=torch.float32)
Input video tensors use [batch, 3, frames, height, width], with even spatial dimensions. encode returns (latent, log_variance) and decode accepts the latent. The included validate.py records the exact tested geometry.
Validation boundary
Before publication, this package requires source-file SHA-256 equality, strict native state-dict loading, finite encode/decode output, and a shape-preserving one-frame CPU round trip. These are component-interface checks only; they do not measure perceptual quality, long-video temporal quality, or Lance end-to-end generation/understanding.