This is Part 7 of the ComfyUI Masterclass series, where we explore the powerful features of ComfyUI for AI image generation. Here's what we've covered so far:
- Part 1: Install and Run ComfyUI deals with installing ComfyUI on lightning.ai, a cloud platform that’s beneficial if you don’t have much GPU power. Since the installation steps are the same as for local installation, you can follow along regardless of your preferred setup
- Part 2: Nodes and Workflows covers the ComfyUI interface, essential node types, and how to build a complete text-to-image workflow from scratch, including workflow organization techniques
Did you know that using the wrong batch settings in ComfyUI could slow down your workflow by up to 400%? - Part 3: The KSampler explores the settings that control your image generation.
- Part 4: Batch Processing, explores everything you need to know about batch processing in ComfyUI, from basic concepts to advanced workflow optimization techniques.
- Part 5: Image to Image explores everything you need to know about image-to-image workflows in ComfyUI.
In our ComfyUI Masterclass series, we've been focusing on SDXL-based models until now. Today, we're exploring something different and exciting: the Flux family of models. - Part 6: Inpainging and Outpainting shows you how you can use inpainting and outpainting in ComfyUI to edit your images.
What is Flux?
Flux is a collection of advanced diffusion models developed by Black Forest Labs. Unlike SDXL models, Flux processes text prompts in a fundamentally different way, resulting in more natural language understanding and better visual coherence in generated images. This difference is immediately noticeable when you start using it.
If you're more of a visual learner, I recommend checking out my YouTube tutorial. It covers everything step-by-step:
The Flux Model Family
The Flux family consists of three main variants, each designed for different users and use cases:
Flux Pro
- Aimed at enterprises and professionals needing commercial-grade outputs
- Only available via API (not downloadable)
- Includes full commercial licensing
- Perfect for production environments requiring top quality and seamless API integration
Flux Dev
- Designed for developers, researchers, and creative professionals
- Output quality slightly below Pro, but still very high
- Downloadable for local use on your own hardware
- Not licensed for commercial use without obtaining permission from Black Forest Labs
Flux Schnell
- Created for general users prioritizing speed and efficiency
- Open-source under the Apache 2.0 license
- Commercial use allowed without additional licensing
- Slightly lower image quality, but significantly faster
- Ideal for rapid prototyping or working with limited hardware
Looking Ahead: Flux 2
Black Forest Labs has officially introduced FLUX 2, their next-generation AI model promising several improvements. However, the official FLUX 2 model isn't currently available for public download on Hugging Face or other repositories.
Getting Started with Flux Models
There are two main approaches to installing Flux models in ComfyUI. Both are documented on this ComfyUI examples page provided by the creators of ComfyUI: Flux Examples
Option 1: Official Repository Download
You can download the official FLUX models from Black Forest Labs' Hugging Face repository. This requires some setup:
- Download the CLIP encoder files and VAE file
- Place each file in specific directories
- Follow the detailed installation process documented on the ComfyUI website
- You will need specialized workflows which you can get from the ComfyUI examples page
This approach offers maximum flexibility but can be complex for beginners.
Option 2: All-in-One File Approach (Recommended)
For a simpler installation:
- Download the single-file FP8 checkpoint version (~17GB)
- Place this file in your ComfyUI models/checkpoints directory
- If using ComfyUI on Lightning AI (for those without sufficient local GPU), construct the download URL as shown in part 1 of this series or copy and paste from here:
- Download Flux Schnell FP8 into Lightning AI Studio
wget -O ComfyUI/models/checkpoints/flux1-schnell-fp8.safetensors "https://huggingface.co/Comfy-Org/flux1-schnell/resolve/main/flux1-schnell-fp8.safetensors"
- Download Flux Dev FP8 into Lightning AI Studio
wget -O ComfyUI/models/checkpoints/flux1-dev-fp8.safetensors "https://huggingface.co/Comfy-Org/flux1-dev/resolve/main/flux1-dev-fp8.safetensors"
- Download Flux Schnell FP8 into Lightning AI Studio
Setting Up Workflows
ComfyUI provides ready-made workflows for both Flux Dev and Flux Schnell:
- Visit the ComfyUI example page
- Drag the workflow image for your chosen Flux model onto your browser where ComfyUI is running
- A complete workflow will instantly appear with all necessary settings (the images contain ComfyUI workflow files encoded in them)
- Save these workflows for future use
Understanding the Workflows
Flux Schnell Workflow
The Schnell workflow resembles the SDXL workflow but with some key differences:
- Different Empty Latent Image node optimized for Flux
- Negative prompt box is collapsed (Flux 1 doesn't support negative prompts)
- CFG value should be set to 1
- Use Euler for sampler and "simple" as scheduler
- Number of steps set to only 4 (compared to 20 for Dev)
Flux Dev Workflow
The Dev workflow - in addition to the differences mentioned in "Flux Schnell Workflow" - includes a specialized "Flux Guidance" node that:
- Controls how strictly the AI adheres to text prompts
- Functions similarly to CFG in traditional Stable Diffusion models
- Allows fine-tuning of the guidance parameter for more creative control
Flux Schnell intentionally lacks this node because it uses a fixed guidance implementation optimized for speed. Schnell is specifically designed to operate with CFG set to 1, which effectively means negative prompts are ignored entirely.
Performance Comparison
In my testing, Flux Dev did produce better quality images than Schnell, but the difference wasn't dramatic enough to justify the significantly longer generation times.
For most users, Schnell is the clear winner. Its lightning-fast performance saves both time and GPU tokens, making it perfect for rapid iteration. Plus, it's the only Flux model that offers free commercial use under its Apache 2.0 license.
Conclusion
Both Flux models deliver impressive results, and I'm genuinely excited to see what Flux 2 will bring when it's finally released to the public.
Black Forest Labs also has an intriguing text-to-video generation teaser on their website. I can't wait to explore that technology when it launches and share my findings with you.