Downloads · 30 days
44
9% of all-time downloads
kzopp/Infinity-2B-GGUF_UNOFFICIAL
Infinity-2B-GGUF_UNOFFICIAL is a text-to-image model from kzopp. Use it when you need an image from a text prompt. The card lists the license as mit.
Downloads · 30 days
44
9% of all-time downloads
All-time downloads
464
Public
Repo size
5.5 GB
Likes
1
Public
Click a slice to open those files.
.gguf3.9 GB · 72%
From the Hugging Face model README

Unofficial Q8_0 GGUF quantization of Infinity-2B with SageAttention support for even faster generation.
✨ SageAttention Integration - 2-5x faster than FlashAttention with automatic fallback 🎨 Gradio Web UI - Easy-to-use interface for image generation 💾 Q8_0 Quantization - ~75% memory reduction with minimal quality loss 🚀 Optimized Inference - T5 encoder on CPU, efficient VRAM usage 🔧 GGUF Support - On-the-fly dequantization with flexible deployment
python gradio_webui.py --autoload
Then open http://127.0.0.1:7860 in your browser.
python generate_image_2b_q8_gguf.py \
--prompt "an astronaut riding a horse on the moon" \
--output output.png
pip install -r Infinity/requirements.txt
pip install gradio gguf
For faster generation:
pip install sageattention>=2.2.0 --no-build-isolation
Requirements: CUDA ≥12.0 (CUDA 12.8+ for Blackwell GPUs like RTX 50-series)
Note: SageAttention is optional. The code automatically falls back to:
You'll need:
infinity_2b_reg_Q8_0.gguf - Infinity-2B model (~2.1 GB)flan-t5-xl-encoder-Q8_0.gguf - T5 text encoder (~1.0 GB)Infinity/infinity_vae_d32_reg.pth - VAE decoder (~0.5 GB)| Component | VRAM Usage |
|---|---|
| Infinity-2B (Q8_0) | ~2.5 GB |
| VAE | ~0.5 GB |
| Working Memory | ~1-2 GB |
| Total (1M res) | ~4-5 GB |
T5 encoder runs on CPU to save VRAM!
Recommended: 8GB+ VRAM for comfortable 1M (1024×1024) generation
The Gradio web interface provides:
# Basic usage
python gradio_webui.py
# Auto-load models on startup (faster)
python gradio_webui.py --autoload
# Create public share link
python gradio_webui.py --share
# Custom port
python gradio_webui.py --server-port 8080
# Full options
python gradio_webui.py \
--autoload \
--server-port 7860 \
--infinity-gguf path/to/infinity.gguf \
--t5-gguf path/to/t5.gguf \
--vae-path path/to/vae.pth
python generate_image_2b_q8_gguf.py [OPTIONS]
| Option | Description | Default |
|---|---|---|
--prompt TEXT | Text prompt for image generation | "an astronaut..." |
--infinity-gguf PATH | Path to Infinity GGUF file | infinity_2b_reg_Q8_0.gguf |
--t5-gguf PATH | Path to T5 encoder GGUF | flan-t5-xl-encoder-Q8_0.gguf |
--vae-path PATH | Path to VAE checkpoint | Infinity/infinity_vae_d32_reg.pth |
--output PATH | Output image path | output.png |
--cfg-scale FLOAT | CFG scale (1.0-10.0) | 3.0 |
--tau FLOAT | Temperature (0.1-1.0) | 0.5 |
--seed INT | Random seed for reproducibility | 42 |
--pn {0.06M,0.25M,1M} | Resolution preset | 1M |
--aspect-ratio FLOAT | Aspect ratio (height/width) | 1.0 |
The implementation includes:
GGUFLinear layers for on-the-fly dequantizationSee patch_infinity_for_gguf.sh for implementation details.
MIT