Downloads · 30 days
13
1% of all-time downloads
wangkanai/wan22-fp32-encoders-gguf
wan22-fp32-encoders-gguf 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.
High-precision FP32 text encoder models in GGUF format for the WAN (World Animation Network) 2.2 video generation system. This repository contains the UMT5-XXL encoder optimized for text-to-video generation tasks.
Downloads · 30 days
13
1% of all-time downloads
All-time downloads
959
Public
Repo size
22.7 GB
Likes
2
Public
Click a slice to open those files.
.gguf22.7 GB · 100%
From the Hugging Face model README
High-precision FP32 text encoder models in GGUF format for the WAN (World Animation Network) 2.2 video generation system. This repository contains the UMT5-XXL encoder optimized for text-to-video generation tasks.
The WAN 2.2 FP32 encoders provide maximum precision text understanding for video generation workflows. The UMT5-XXL (Unified Multilingual T5) encoder processes text prompts and converts them into high-dimensional embeddings that guide the video generation process.
Key Features:
wan22-fp32-encoders-gguf/
└── text_encoders/
└── umt5-xxl-encoder-f32.gguf (22 GB)
Total Repository Size: ~22 GB
| File | Size | Format | Precision | Purpose |
|---|---|---|---|---|
text_encoders/umt5-xxl-encoder-f32.gguf | 22 GB | GGUF | FP32 | Text prompt encoding |
from diffusers import DiffusionPipeline
import torch
# Load WAN pipeline with custom FP32 encoder
pipe = DiffusionPipeline.from_pretrained(
"wan/wan-2.2",
torch_dtype=torch.float32,
custom_pipeline="wan_pipeline"
)
# Load FP32 text encoder from local path
pipe.load_text_encoder(
"E:/huggingface/wan22-fp32-encoders-gguf/text_encoders/umt5-xxl-encoder-f32.gguf",
precision="fp32"
)
pipe = pipe.to("cuda")
# Generate video with high-precision text understanding
prompt = "A cinematic shot of a tiger running through a dense jungle at sunset, dynamic camera following action"
video_frames = pipe(
prompt=prompt,
num_frames=120,
height=720,
width=1280,
guidance_scale=7.5,
num_inference_steps=50
).frames
# Save video
from diffusers.utils import export_to_video
export_to_video(video_frames, "output.mp4", fps=24)
from transformers import AutoTokenizer, AutoModel
import torch
# Direct encoder loading for custom pipelines
tokenizer = AutoTokenizer.from_pretrained("google/umt5-xxl")
# Load GGUF encoder (requires gguf-compatible loader)
from gguf_loader import load_gguf_model
encoder = load_gguf_model(
"E:/huggingface/wan22-fp32-encoders-gguf/text_encoders/umt5-xxl-encoder-f32.gguf",
device="cuda",
torch_dtype=torch.float32
)
# Encode text prompt
prompt = "Epic aerial view of a futuristic city at night with neon lights"
inputs = tokenizer(prompt, return_tensors="pt", padding=True).to("cuda")
with torch.no_grad():
text_embeddings = encoder(**inputs).last_hidden_state
# Use embeddings in video generation pipeline
# ... (integrate with WAN diffusion model)
import torch
from diffusers import DiffusionPipeline
# Load with CPU offloading for lower VRAM usage
pipe = DiffusionPipeline.from_pretrained(
"wan/wan-2.2",
torch_dtype=torch.float32
)
pipe.enable_model_cpu_offload() # Offload to CPU when not in use
pipe.enable_attention_slicing() # Reduce memory during attention
pipe.load_text_encoder(
"E:/huggingface/wan22-fp32-encoders-gguf/text_encoders/umt5-xxl-encoder-f32.gguf"
)
# Generate with memory optimization
video = pipe(
"A serene mountain landscape with flowing waterfall",
num_frames=60,
height=512,
width=896
).frames
| Component | Specification |
|---|---|
| Base Model | UMT5-XXL (Unified Multilingual T5) |
| Precision | FP32 (32-bit floating point) |
| Format | GGUF (GPT-Generated Unified Format) |
| Parameters | ~11 billion parameters |
| Context Length | 512 tokens |
| Hidden Size | 4096 dimensions |
| Encoder Layers | 24 transformer layers |
| Attention Heads | 64 attention heads |
| Precision | Size | VRAM | Accuracy | Speed |
|---|---|---|---|---|
| FP32 (this model) | 22 GB | 24 GB | Highest | Slower |
| FP16 | 11 GB | 12 GB | High | Medium |
| FP8 | 5.5 GB | 6 GB | Good | Faster |
enable_model_cpu_offload() for lower VRAMenable_attention_slicing() to reduce memory peaks# High-quality video generation settings
generation_config = {
"num_frames": 120, # 5 seconds at 24fps
"height": 720, # 720p resolution
"width": 1280, # 16:9 aspect ratio
"guidance_scale": 7.5, # Balanced prompt adherence
"num_inference_steps": 50, # High quality (slower)
"fps": 24, # Cinematic frame rate
}
# Fast preview settings
preview_config = {
"num_frames": 60, # 2.5 seconds at 24fps
"height": 512, # Lower resolution
"width": 896, # 16:9 aspect ratio
"guidance_scale": 7.0, # Slightly lower
"num_inference_steps": 25, # Faster generation
"fps": 24,
}
This model is released under the WAN License. Please review the license terms before use:
For commercial licensing inquiries, please contact the WAN development team.
If you use these encoders in your research or projects, please cite:
@misc{wan22-fp32-encoders,
title={WAN 2.2 FP32 Text Encoders for Video Generation},
author={WAN Team},
year={2024},
howpublished={\url{https://huggingface.co/wan/wan-2.2-fp32-encoders-gguf}},
note={UMT5-XXL text encoder in GGUF format for high-precision video generation}
}
Out of Memory (OOM) Errors:
Slow Generation Speed:
num_inference_steps (50 → 30)Loading Errors:
Quality Issues:
guidance_scale (7.5 → 9.0) for stronger prompt adherencenum_inference_steps for better qualityFor issues, questions, or contributions:
Model Version: 2.2 Last Updated: 2024-08-12 README Version: v1.0 Maintained by: WAN Development Team