How to Use FLUX 1 on ComfyUI: The Ultimate Beginner's Guide
Flux is a suite of text-to-image diffusion models crafted by Black Forest Labs. Lern how to use flux 1. As of August 2024, it stands as the top open-source model available for local use, offering quality that exceeds both SDXL and Stable Diffusion 3 medium.
Paul Mann
Article published: 10/02/2024
Flux.1 [dev]
The Flux.1 dev model delivers excellent prompt responsiveness, creating high-quality images with accurate anatomy and is even capable of generating text with good precision.
This guide will walk you through how to install different versions of the Flux models on your ComfyUI setup:
- Single-file version for straightforward installation
- Fast version for quicker image generation
- Full version for the best possible image quality
Important Notes:
- Flux is not currently supported on AUTOMATIC1111, but it is available on Forge, which offers a similar interface.
- Flux on Forge is an option if you have a GPU with limited VRAM (6GB or less).
How to set up Flux 1: Software Requirements
The following variants of the Flux AI model are available on ComfyUI:
- Single-file FP8 version: A simplified, lower-precision model that comes in a single file. It is easy to set up and uses less VRAM (requires 16 GB).
- Flux Schnell version: A streamlined, 4-step model that trades some image quality for faster generation times (also requires 16 GB).
- Full FP16 version: The high-precision version, delivering slightly better quality at the cost of needing more VRAM (24 GB).
If you’re new to Flux, it’s recommended to start with the single-file FP8 version.
Note: Flux Pro is only available via API and can be tested on Difcraft: https://difcraft.com/
Single-file FP8 Flux Model Installation
The following variants of the Flux AI model are available o
The easiest way to use Flux on ComfyUI is through its single-file checkpoint model. ComfyUI offers built-in support for Flux.
Step-by-Step Installation:
Download the Flux AI Model
Obtain the Flux1 dev FP8 checkpoint file and place it in theComfyUI > models > checkpointsdirectory.Update ComfyUI
Since Flux has been supported on ComfyUI starting in August 2024, ensure your ComfyUI installation is up-to-date. Use the ComfyUI Manager to perform this update (Manager > Update All). Don’t forget to reload the ComfyUI page after updating.Load the Flux Workflow
Download the JSON file for the Flux1 dev FP8 workflow and load it into ComfyUI. If you encounter any errors, update ComfyUI and reload the page.
Once loaded, you can start generating images by clicking “Queue Prompt.”
Example prompt:
“A Monkey driving a rover across Mars.”
Setting Up the Flux Fast (Schnell) Model
If you find that the single-file FP8 model is too slow for your needs, you might want to try the Flux Schnell version. This model still maintains FP8 precision, but is faster, though it sacrifices some image quality.
Step-by-Step Installation:
Download the Flux AI Fast Model
Obtain the Flux1 Schnell model and place it inComfyUI > models > unet.Download the Required CLIP Models
You’ll need two CLIP models for this setup:clip_l.safetensorst5xxl_fp8_e4m3fn.safetensors
Save these in theComfyUI > models > clipdirectory.
Download the VAE
Download the Flux VAE model and place it inComfyUI > models > vae.Update ComfyUI
Like before, update ComfyUI if needed using the ComfyUI Manager.Load the Flux Schnell Workflow
Download and load the Flux1 Schnell workflow JSON file into ComfyUI, and ensure you reload the page to avoid errors.
Example prompt:
“An astronaut hatches from an egg on the moon.”
While this version generates images faster, be prepared for slightly lower coherence and quality compared to the full FP8 model.
Installing the Full-Precision Flux Model
For users with GPUs that have 24 GB of VRAM and who are willing to wait for the best possible image output, the full FP16 version is your go-to choice.
Step-by-Step Installation:
Download the Full-Precision Flux Model
Head to the official Flux dev model page and download the full model after agreeing to the terms. Save it in theComfyUI > models > unetdirectory.Download the CLIP Models
For this setup, download the following CLIP models:clip_l.safetensorst5xxl_fp16.safetensors
Place these in theComfyUI > models > clipfolder.
Download the VAE
Download the corresponding VAE model and put it in theComfyUI > models > vaefolder.Update ComfyUI
As before, ensure ComfyUI is up-to-date.Load the Full-Precision Workflow
Load the JSON file for the Flux1 dev regular full FP16 workflow. After updating ComfyUI and reloading the page, you’re all set to start generating high-quality images.
This guide should help you get the Flux AI models running on your ComfyUI setup, regardless of whether you prioritize ease, speed, or image quality.
How to get started with Flux 1: Advanced
To delve further into the topic:
Create LoRA’s: https://github.com/lllyasviel/stable-diffusion-webui-forge/discussions/1038
Train Models: https://fal.ai/models/fal-ai/flux-lora-general-training
Or
Use every FLUX.1 Model on Difcraft: https://difcraft.com/