🚀 Flux.1 Lite
We are excited to present Flux.1 Lite, an 8B parameter transformer model distilled from FLUX.1-dev. It uses less RAM, runs faster, and maintains the same precision as the original model.
🚀 Quick Start
!!! Experimental supported by gpustack/llama-box v0.0.84+ only !!!
✨ Features
- Model creator: Freepik
- Original model: flux.1-lite-8B-alpha
- GGUF quantization: Based on stable-diffusion.cpp ac54e patched by llama-box.
- Quantization details:
| Quantization | OpenAI CLIP ViT-L/14 Quantization | Google T5-xxl Quantization | VAE Quantization |
| --- | --- | --- | --- |
| FP16 | FP16 | FP16 | FP16 |
| Q8_0 | FP16 | Q8_0 | FP16 |
| (pure) Q8_0 | Q8_0 | Q8_0 | FP16 |
| Q4_1 | FP16 | Q8_0 | FP16 |
| Q4_0 | FP16 | Q8_0 | FP16 |
| (pure) Q4_0 | Q4_0 | Q4_0 | FP16 |

💻 Usage Examples
Basic Usage
import torch
from diffusers import FluxPipeline
base_model_id = "Freepik/flux.1-lite-8B-alpha"
torch_dtype = torch.bfloat16
device = "cuda"
model_id = "Freepik/flux.1-lite-8B-alpha"
pipe = FluxPipeline.from_pretrained(
model_id, torch_dtype=torch_dtype
).to(device)
prompt = "A close-up image of a green alien with fluorescent skin in the middle of a dark purple forest"
guidance_scale = 3.5
n_steps = 28
seed = 11
with torch.inference_mode():
image = pipe(
prompt=prompt,
generator=torch.Generator(device="cpu").manual_seed(seed),
num_inference_steps=n_steps,
guidance_scale=guidance_scale,
height=1024,
width=1024,
).images[0]
image.save("output.png")
📚 Documentation
Motivation
Inspired by Ostris findings, we analyzed the mean squared error (MSE) between the input and output of each block to quantify their contribution to the final result, revealing significant variability.

As Ostris pointed out, not all blocks contribute equally. While skipping just one of the early MMDiT or late DiT blocks can significantly impact model performance, skipping any single block in between does not have a significant impact over the final image quality.

Future work
Stay tuned! Our goal is to distill FLUX.1-dev further until it can run smoothly on 24 GB consumer-grade GPU cards, maintaining its original precision (bfloat16), and running even faster, making high-quality AI models accessible to everyone.
ComfyUI
We've also crafted a ComfyUI workflow to make using Flux.1 Lite even more seamless! Find it in comfy/flux.1-lite_workflow.json
.

The safetensors checkpoint is available here: flux.1-lite-8B-alpha.safetensors
HF spaces 🤗
You can also test the model on Flux.1 Lite HF space thanks to TheAwakenOne
Try it out at Freepik!
Our AI generator is now powered by Flux.1 Lite!
🔥 News 🔥
📄 License
The FLUX.1 [dev] Model is licensed by Black Forest Labs. Inc. under the FLUX.1 [dev] Non-Commercial License. Copyright Black Forest Labs. Inc.
Our model weights are released under the FLUX.1 [dev] Non-Commercial License.
Citation
@article{flux1-lite,
title={Flux.1 Lite: Distilling Flux1.dev for Efficient Text-to-Image Generation},
author={Daniel Verdú, Javier Martín},
email={dverdu@freepik.com, javier.martin@freepik.com},
year={2024},
}
Attribution notice
The FLUX.1 [dev] Model is licensed by Black Forest Labs. Inc. under the FLUX.1 [dev] Non-Commercial License. Copyright Black Forest Labs. Inc.
Our model weights are released under the FLUX.1 [dev] Non-Commercial License.