Downloads · 30 days
121
1% of all-time downloads
wangkanai/wan22-fp16-encoders-gguf
wan22-fp16-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 FP16 text encoders for the WAN 2.2 (World Animated Network) video generation model in optimized GGUF format. These encoders provide enhanced text understanding and conditioning for high-quality text-to-…
Downloads · 30 days
121
1% of all-time downloads
All-time downloads
9.8K
Public
Repo size
11.4 GB
Likes
6
Public
Click a slice to open those files.
.gguf11.4 GB · 100%
From the Hugging Face model README
High-precision FP16 text encoders for the WAN 2.2 (World Animated Network) video generation model in optimized GGUF format. These encoders provide enhanced text understanding and conditioning for high-quality text-to-video and image-to-video generation.
This repository contains the UMT5-XXL text encoder component for WAN 2.2, optimized in FP16 precision using the GGUF format. The text encoder is a critical component that processes text prompts and generates embeddings that condition the video generation process.
Key Features:
Capabilities:
wan22-fp16-encoders-gguf/
└── text_encoders/
└── umt5-xxl-encoder-f16.gguf (10.59 GB)
Total Repository Size: ~10.6 GB
| File | Size | Format | Precision | Purpose |
|---|---|---|---|---|
umt5-xxl-encoder-f16.gguf | 10.59 GB | GGUF | FP16 | UMT5-XXL text encoder |
When using with complete WAN 2.2 model:
from diffusers import WanPipeline
import torch
# Initialize pipeline with custom encoder path
pipe = WanPipeline.from_pretrained(
"Lightricks/wan-2.2",
text_encoder_path="E:/huggingface/wan22-fp16-encoders-gguf/text_encoders/umt5-xxl-encoder-f16.gguf",
torch_dtype=torch.float16,
variant="fp16"
)
pipe.to("cuda")
# Generate video from text prompt
prompt = "A cat walking on a beach at sunset, cinematic lighting, 4k quality"
video = pipe(
prompt=prompt,
num_frames=16,
num_inference_steps=50,
guidance_scale=7.5
).frames
# Save video
from diffusers.utils import export_to_video
export_to_video(video, "output.mp4", fps=8)
from diffusers import WanPipeline
import torch
# Load with custom settings
pipe = WanPipeline.from_pretrained(
"Lightricks/wan-2.2",
text_encoder_path="E:/huggingface/wan22-fp16-encoders-gguf/text_encoders/umt5-xxl-encoder-f16.gguf",
torch_dtype=torch.float16,
use_safetensors=True
)
# Enable memory optimizations
pipe.enable_model_cpu_offload()
pipe.enable_vae_slicing()
# Generate with detailed prompt
prompt = """
A professional dancer performing contemporary dance in a modern studio,
smooth camera movement, dramatic lighting, high quality, 24fps
"""
video = pipe(
prompt=prompt,
negative_prompt="blurry, low quality, distorted, static",
num_frames=24,
height=512,
width=512,
num_inference_steps=75,
guidance_scale=9.0
).frames
export_to_video(video, "dance_video.mp4", fps=24)
prompts = [
"A serene mountain landscape at dawn",
"City traffic at night with neon lights",
"Ocean waves crashing on rocky shore"
]
videos = []
for prompt in prompts:
video = pipe(
prompt=prompt,
num_frames=16,
num_inference_steps=50
).frames
videos.append(video)
# Save all videos
for idx, video in enumerate(videos):
export_to_video(video, f"video_{idx:03d}.mp4", fps=8)
# Enable CPU offloading for lower VRAM usage
pipe.enable_model_cpu_offload()
# Enable VAE slicing for memory efficiency
pipe.enable_vae_slicing()
# Use attention slicing for large resolutions
pipe.enable_attention_slicing(slice_size=1)
# Use xformers for faster attention (if installed)
pipe.enable_xformers_memory_efficient_attention()
# Reduce inference steps for faster generation
video = pipe(prompt, num_inference_steps=25) # vs 50-75
# Use lower resolution for faster processing
video = pipe(prompt, height=256, width=256)
# Higher inference steps for better quality
video = pipe(prompt, num_inference_steps=100)
# Higher guidance scale for stronger prompt adherence
video = pipe(prompt, guidance_scale=12.0)
# Use FP16 precision for quality vs FP8/INT8
# (This encoder is already FP16)
This model is released under a custom license. Please review the license terms before use:
License Type: Other (WAN Model License)
Key Terms:
For complete license terms, visit: https://huggingface.co/Lightricks/wan-2.2
If you use these encoders in your research or projects, please cite:
@misc{wan22-encoders-gguf,
title={WAN 2.2 FP16 Text Encoders (GGUF Format)},
author={Lightricks Research},
year={2024},
howpublished={\url{https://huggingface.co/Lightricks/wan-2.2}},
note={UMT5-XXL text encoder for WAN video generation}
}
pip install diffusers transformers acceleratepip install diffusers>=0.25.0
pip install transformers>=4.36.0
pip install accelerate>=0.25.0
pip install torch>=2.1.0
pip install xformers # Optional, for memory efficiency
For questions, issues, or collaboration inquiries:
Last Updated: October 2024 Model Version: WAN 2.2 Text Encoders FP16 Format Version: GGUF Repository Maintainer: Lightricks Research Team