Downloads · 30 days
0
wangkanai/wan22-fp8-encoders
wan22-fp8-encoders is a text-to-video model from wangkanai. Use it when you need video from a text prompt. It is set up for diffusers. The card lists the license as other.
Optimized FP8 text encoder models for WAN (Wan An Nian) 2.2 video generation pipeline. These quantized encoders provide significantly reduced memory footprint while maintaining high-quality text understanding for vide…
Downloads · 30 days
0
Access
Public
Updated Oct 27, 2025
Repo size
11.6 GB
Likes
1
Public
Click a slice to open those files.
.safetensors11.6 GB · 100%
From the Hugging Face model README
Optimized FP8 text encoder models for WAN (Wan An Nian) 2.2 video generation pipeline. These quantized encoders provide significantly reduced memory footprint while maintaining high-quality text understanding for video generation tasks.
This repository contains FP8-quantized text encoder models specifically optimized for the WAN 2.2 video generation system. The models enable text-to-video and image-to-video generation with substantially lower VRAM requirements compared to FP16 variants.
Key Features:
Capabilities:
wan22-fp8-encoders/
└── text_encoders/
├── t5-xxl-fp8.safetensors # 4.6 GB - T5-XXL FP8 text encoder
└── umt5-xxl-fp8.safetensors # 6.3 GB - UMT5-XXL FP8 multilingual encoder
Total Repository Size: 11 GB
| File | Size | Description | Use Case |
|---|---|---|---|
t5-xxl-fp8.safetensors | 4.6 GB | T5-XXL FP8 encoder | English text understanding |
umt5-xxl-fp8.safetensors | 6.3 GB | UMT5-XXL FP8 encoder | Multilingual text support |
from diffusers import WanPipeline
import torch
# Load WAN pipeline with FP8 text encoders
pipe = WanPipeline.from_pretrained(
"path/to/wan22-base-model",
text_encoder_path="E:/huggingface/wan22-fp8-encoders/text_encoders/t5-xxl-fp8.safetensors",
torch_dtype=torch.float16,
variant="fp16"
)
pipe.to("cuda")
# Generate video from text prompt
prompt = "A serene mountain landscape at sunset with clouds moving gently"
video = pipe(
prompt=prompt,
num_frames=48,
height=512,
width=512,
num_inference_steps=30,
guidance_scale=7.5
).frames
# Save video
from diffusers.utils import export_to_video
export_to_video(video, "output.mp4", fps=24)
from diffusers import WanPipeline
import torch
# Load with multilingual encoder
pipe = WanPipeline.from_pretrained(
"path/to/wan22-base-model",
text_encoder_path="E:/huggingface/wan22-fp8-encoders/text_encoders/umt5-xxl-fp8.safetensors",
torch_dtype=torch.float16,
variant="fp16"
)
pipe.to("cuda")
# Generate with non-English prompt
prompt = "美丽的樱花树在春天盛开,花瓣随风飘落"
video = pipe(prompt=prompt, num_frames=48).frames
import torch
from diffusers import WanPipeline
# Enable memory optimizations
pipe = WanPipeline.from_pretrained(
"path/to/wan22-base-model",
text_encoder_path="E:/huggingface/wan22-fp8-encoders/text_encoders/t5-xxl-fp8.safetensors",
torch_dtype=torch.float16,
variant="fp16"
)
pipe.to("cuda")
# Enable memory-efficient attention
pipe.enable_attention_slicing()
pipe.enable_vae_slicing()
# Generate with lower memory usage
video = pipe(
prompt="Your prompt here",
num_frames=24, # Reduced frame count
height=512,
width=512
).frames
| Configuration | VRAM Usage | Generation Time (48 frames) |
|---|---|---|
| T5-XXL FP8 + Base Model | ~16 GB | ~120 seconds (RTX 4090) |
| UMT5-XXL FP8 + Base Model | ~18 GB | ~130 seconds (RTX 4090) |
| With Attention Slicing | -20% | +10% time |
These FP8-quantized text encoders are derived from the original T5 and UMT5 models:
License Terms: These models may be used for research and commercial purposes. Attribution to the original T5/UMT5 authors and the WAN project is appreciated but not required under Apache 2.0 terms.
Disclaimer: These are quantized versions optimized for memory efficiency. For critical applications, validate output quality against FP16 versions.
If you use these FP8 encoders in your research or applications, please cite:
@misc{wan22-fp8-encoders,
title={WAN 2.2 FP8 Text Encoders},
author={WAN Community Contributors},
year={2024},
publisher={Hugging Face},
note={FP8-quantized T5-XXL and UMT5-XXL encoders for video generation}
}
@article{t5,
title={Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer},
author={Raffel, Colin and Shazeer, Noam and Roberts, Adam and Lee, Katherine and Narang, Sharan and Matena, Michael and Zhou, Yanqi and Li, Wei and Liu, Peter J},
journal={Journal of Machine Learning Research},
volume={21},
number={140},
pages={1--67},
year={2020}
}
@article{umt5,
title={UniMax: Fairer and More Effective Language Sampling for Large-Scale Multilingual Pretraining},
author={Chung, Hyung Won and Garrette, Dan and Tan, Kiat Chuan and Riesa, Jason},
journal={arXiv preprint arXiv:2304.09151},
year={2023}
}
For questions, issues, or feature requests:
Note: These FP8 encoders are part of the WAN 2.2 ecosystem. Ensure you have the complete WAN 2.2 pipeline installed for full functionality. Visit the official repository for installation instructions and additional components.