Instructions to use black-forest-labs/FLUX.1-dev with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use black-forest-labs/FLUX.1-dev with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
FLUX on phone β 12-bit quantization results
#603
by 3morixd - opened
We've been working on running FLUX.1-dev on phones via aggressive quantization.
Results: with 8-bit quantization, FLUX generates a 512x512 image in ~8 seconds on Snapdragon 865. Not real-time, but usable for batch generation.
FLUX.1-schnell (2-step) is more practical for mobile β ~3 seconds per image. We use it as our default image generation model in our mobile pipeline.
Check out our org (dispatchAI) for mobile-optimized models.
β Dispatch AI (FZE), Sharjah UAE