Views
No views yet
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| 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 |
1from diffusers import WanPipeline
2import torch
3
4# Load WAN pipeline with FP8 text encoders
5pipe = WanPipeline.from_pretrained(
6 "path/to/wan22-base-model",
7 text_encoder_path="E:/huggingface/wan22-fp8-encoders/text_encoders/t5-xxl-fp8.safetensors",
8 torch_dtype=torch.float16,
9 variant="fp16"
10)
11pipe.to("cuda")
12
13# Generate video from text prompt
14prompt = "A serene mountain landscape at sunset with clouds moving gently"
15video = pipe(
16 prompt=prompt,
17 num_frames=48,
18 height=512,
19 width=512,
20 num_inference_steps=30,
21 guidance_scale=7.5
22).frames
23
24# Save video
25from diffusers.utils import export_to_video
26export_to_video(video, "output.mp4", fps=24)1from diffusers import WanPipeline
2import torch
3
4# Load with multilingual encoder
5pipe = WanPipeline.from_pretrained(
6 "path/to/wan22-base-model",
7 text_encoder_path="E:/huggingface/wan22-fp8-encoders/text_encoders/umt5-xxl-fp8.safetensors",
8 torch_dtype=torch.float16,
9 variant="fp16"
10)
11pipe.to("cuda")
12
13# Generate with non-English prompt
14prompt = "美丽的樱花树在春天盛开,花瓣随风飘落"
15video = pipe(prompt=prompt, num_frames=48).frames1import torch
2from diffusers import WanPipeline
3
4# Enable memory optimizations
5pipe = WanPipeline.from_pretrained(
6 "path/to/wan22-base-model",
7 text_encoder_path="E:/huggingface/wan22-fp8-encoders/text_encoders/t5-xxl-fp8.safetensors",
8 torch_dtype=torch.float16,
9 variant="fp16"
10)
11pipe.to("cuda")
12
13# Enable memory-efficient attention
14pipe.enable_attention_slicing()
15pipe.enable_vae_slicing()
16
17# Generate with lower memory usage
18video = pipe(
19 prompt="Your prompt here",
20 num_frames=24, # Reduced frame count
21 height=512,
22 width=512
23).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 |
1@misc{wan22-fp8-encoders,
2 title={WAN 2.2 FP8 Text Encoders},
3 author={WAN Community Contributors},
4 year={2024},
5 publisher={Hugging Face},
6 note={FP8-quantized T5-XXL and UMT5-XXL encoders for video generation}
7}
8
9@article{t5,
10 title={Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer},
11 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},
12 journal={Journal of Machine Learning Research},
13 volume={21},
14 number={140},
15 pages={1--67},
16 year={2020}
17}
18
19@article{umt5,
20 title={UniMax: Fairer and More Effective Language Sampling for Large-Scale Multilingual Pretraining},
21 author={Chung, Hyung Won and Garrette, Dan and Tan, Kiat Chuan and Riesa, Jason},
22 journal={arXiv preprint arXiv:2304.09151},
23 year={2023}
24}