Phase 2: Image Generation · 50 min · Python · fal.ai API · Hugging Face Diffusers
The FLUX Model Family
FLUX.1 Pro for quality, FLUX.1 Dev for open-weights flexibility, FLUX.1 Schnell for speed — knowing which to use when is image generation engineering.
Hiring signal: FLUX model selection reasoning (Pro vs Dev vs Schnell) is a standard question in generative media interviews — it tests whether you understand the speed-quality-cost trade-off.
What you will learn
- Generate images with FLUX.1 Pro (API, highest quality), FLUX.1 Dev (open weights, non-commercial), and FLUX.1 Schnell (open weights, 1-4 step, Apache 2.0)
- Choose the right FLUX variant for speed, quality, or cost
- Understand FLUX.2 improvements: better prompt adherence and text rendering
- Compare FLUX vs SDXL: FLUX for quality and speed, SDXL for ecosystem (LoRAs, ControlNets)
The Problem
A team uses FLUX.1 Pro for every image generation. At 10,000 images/day, they're spending $500/day on API calls ($0.05/image). They could use FLUX.1 Schnell at $0.003/image ($30/day) for 90% of their use cases and reserve Pro for hero images. But they don't know the difference between the variants, so they overpay by 16x.
FLUX model selection is a standard interview question because it tests whether you understand the speed-quality-cost trade-off — the core engineering decision in image generation.
What you'll build
Generate the same prompt with FLUX.1 Schnell, FLUX.1 Dev, and FLUX.1 Pro. Measure generation time, cost, and compare output quality. Write a decision guide for when to use each variant.
The FLUX Model Family
FLUX.1 is developed by Black Forest Labs (BFL), founded by the original Stable Diffusion creators. There are three main variants:
FLUX.1 Schnell
The speed variant — distilled for 1-4 step generation.
| Property | Value |
|---|
| Architecture | DiT (Diffusion Transformer) |
| Steps | 1-4 (distilled) |
| Guidance | None needed (guidance_scale=0.0) |
| Speed | ~2 seconds (1024x1024) |
| Cost (fal.ai) | $0.003/image |
| License | Apache 2.0 (commercial use) |
| Weights | Open on Hugging Face |
| Best for | Bulk generation, rapid prototyping, pipelines |
# FLUX Schnell via fal.ai
import fal_client
result = fal_client.subscribe("fal-ai/flux/schnell", arguments={
"prompt": "a cat on a windowsill",
"num_inference_steps": 4,
"guidance_scale": 0.0,
"image_size": {"width": 1024, "height": 1024},
})
FLUX.1 Dev
The quality variant — open weights for self-hosting.
| Property | Value |
|---|
| Architecture | DiT |
| Steps | 20-50 (standard diffusion) |
| Guidance | 3.5 (CFG needed) |
| Speed | ~8 seconds (1024x1024) |
| Cost (fal.ai) | $0.025/image |
| License | Non-commercial (research only) |
| Weights | Open on Hugging Face |
| Best for | Research, self-hosting experiments, quality comparison |
FLUX.1 Pro
The production quality variant — API only.
| Property | Value |
|---|
| Architecture | DiT (larger than Dev) |
| Steps | 20-50 |
| Guidance | 3.5 |
| Speed | ~12 seconds (1024x1024) |
| Cost (fal.ai) | $0.05/image |
| License | Commercial (via API) |
| Weights | Closed (API only) |
| Best for | Hero images, print quality, final production output |
FLUX.2
The next generation (announced 2026):
- Better prompt adherence (especially long, complex prompts)
- Improved text rendering in images
- Better human anatomy (fewer extra fingers)
- Faster distilled variant
You need to generate 5,000 product images/day for an e-commerce site. Which FLUX variant should you use?
FLUX.1 Schnell is the right choice: $0.003/image × 5000 = $15/day (vs $250/day for Pro), 4 steps (~2s/image), and Apache 2.0 license allows commercial use. Product images don't need Pro-level quality — Schnell is more than sufficient. Reserve Pro for hero/marketing images where quality matters more than cost.
Unlock the full lesson
You've read the first 2 sections. The rest of this lesson covers Decision Framework, FLUX vs SDXL: When to Use Each, Key Takeaways, What's Next — plus a hands-on lab, quiz, and project artifact.
Create a free account to unlock Phase 0 and Phase 1 of every course — no credit card.
Browse all courses · View pricing · DeVenture Academy