Instructions to use YiYiXu/taew2_2-diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use YiYiXu/taew2_2-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("YiYiXu/taew2_2-diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Wan2.2
How to use YiYiXu/taew2_2-diffusers 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
|
Download README.md from YiYiXu/taew2_2-diffusers: direct link, hf CLI and curl.
- Browser
- Download file 1.37 kB
-
https://huggingface.co/YiYiXu/taew2_2-diffusers/resolve/main/README.md
- Command line
-
hf download hf://YiYiXu/taew2_2-diffusers/README.md
-
curl -L -o README.md https://huggingface.co/YiYiXu/taew2_2-diffusers/resolve/main/README.md
1.37 kB
| license: mit | |
| base_model: Wan-AI/Wan2.2-TI2V-5B-Diffusers | |
| library_name: diffusers | |
| tags: | |
| - diffusers | |
| - autoencoder | |
| - wan2.2 | |
| - taehv | |
| # taew2_2 — Tiny Video AutoEncoder for Wan 2.2 (Diffusers) | |
| [`taew2_2`](https://github.com/madebyollin/taehv) by Ollin Boer Bohan, converted to `AutoencoderTinyVideo` | |
| (`scripts/convert_taehv_to_diffusers.py`). A tiny causal video autoencoder (11.4M parameters) for the latent space | |
| of the Wan 2.2 VAE (`AutoencoderKLWan`, 48 channels, 16× spatial / 4× temporal): previews and real-time decoding, | |
| roughly 50× faster than the full VAE. It works on the *normalized* (roughly unit Gaussian) Wan 2.2 latents. | |
| ```python | |
| import torch | |
| from diffusers import AutoencoderTinyVideo | |
| from diffusers.models.autoencoders.autoencoder_tiny_video import TinyVideoDecodeCache | |
| vae = AutoencoderTinyVideo.from_pretrained("YiYiXu/taew2_2-diffusers", dtype=torch.bfloat16).to("cuda") | |
| # one shot: [B, 48, T, h, w] normalized latents -> [B, 3, 4 * T - 3, 16 * h, 16 * w] frames in [-1, 1] | |
| frames = vae.decode(latents).sample | |
| # chunk by chunk (streaming / world models): identical result, only the new latents are decoded per call | |
| cache = TinyVideoDecodeCache() | |
| for chunk in latent_chunks: | |
| frames = vae.decode(chunk, cache=cache).sample | |
| ``` | |
| Weights: the `taew2_2.pth` release of [madebyollin/taehv](https://github.com/madebyollin/taehv) (MIT). | |