Readme
About
Cog implementation of Freepik/flux.1-lite-8B-alpha
Flux.1 Lite
We are thrilled to announce the alpha release of Flux.1 Lite, an 8B parameter transformer model distilled from the FLUX.1-dev model. This version uses 7 GB less RAM and runs 23% faster while maintaining the same precision (bfloat16) as the original model.
Text-to-Image
Flux.1 Lite is ready to unleash your creativity! For the best results, we strongly recommend using a guidance_scale
of 3.5 and setting n_steps
between 22 and 30.
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
Try it out at Freepik!
Our AI generator is now powered by Flux.1 Lite!
🔥 News 🔥
- Oct 23, 2024. Alpha 8B checkpoint is publicly available on HuggingFace Repo.
Citation
If you find our work helpful, please cite it!
@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},
}
Licensing and commercial use
If you generate images on Replicate with FLUX.1 models and their fine-tunes, then you can use the images commercially.
If you download the weights off Replicate and generate images on your own computer, you can’t use the images commercially.