Flux.1 ComfyUI install guidance, workflow and example

This guide is about how to setup ComfyUI on your Windows computer to run Flux.1. It covers the following topics:

  • Introduction to Flux.1
  • Overview of different versions of Flux.1
  • Flux Hardware Requirements
  • How to install and use Flux.1 with ComfyUI
  • Related resources for Flux.1, such as LoRA, ControlNet, etc.

In this article, I will introduce different versions of FLux model, primarily the official version and the third-party distilled versions, and additionally, ComfyUI also provides a single-file version of FP8.

  • The first part of the tutorial will mainly explain the official version and the third-party distilled versions, which require more related models to be installed.
  • The second part will use the FP8 version of ComfyUI, which can be used directly with just one Checkpoint model installed.

Introduction to Flux.1

Flux.1 is a suite of generative image models introduced by Black Forest Labs, a lab with exceptional text-to-image generation and language comprehension capabilities. Flux.1 excels in visual quality and image detail, particularly in text generation, complex compositions, and depictions of hands. The model has refined hand details, significantly improving upon the finger deformities often seen in Stable Diffusion models. Flux.1 has also enhanced image quality, closing the gap with the top generative image software, Midjourney.

Black Forest Labs was founded by Robin Rombach, a former core member of Stability AI.

Official website of Black Forest Labs: https://blackforestlabs.ai/ (opens in a new tab)

Install or update Comfy UI

To utilize Flux.1 within ComfyUI, you'll need to upgrade to the latest ComfyUI model. If you haven't updated ComfyUI yet, you can follow the articles below for upgrading or installation instructions.

Part1. Offcial Versions and distilled of Flux.1

Offical Flux.1 models

I have listed the 3 versions currently released by Flux.1 officially, but the official versions have high hardware requirements. Currently there are many open source versions available with lower hardware requirements, which you can choose according to your needs.

Feature/VersionFlux.1 ProFlux.1 DevFlux.1 Schnell
OverviewCutting-edge performance in image generation with top-notch prompt following, visual quality, image detail, and output diversity.Open-source model with quality and prompt adherence similar to Pro, more efficient for users with GPUs.Open-source model, the fastest option for local development and personal use, with quick response and low configuration requirements.
Visual QualityTop-tierSimilar to ProGood
Image DetailTop-tierSimilar to ProGood
Output DiversityHighMediumMedium
Prompt AdherenceHighMediumMedium
Hand Detail OptimizationYesYesYes
Pricing (Per Image)$0.055API: $0.03, Free downloadAPI: $0.003, Free download
License TypeEnterprise solutions, API onlyOpen-source, FLUX.1-dev Non-Commercial License (opens in a new tab)Apache2.0 (opens in a new tab), Commercial use allowed
Model DownloadNot available for downloadAvailable for download Flux.1 Dev GitHub repository (opens in a new tab)Flux.1 Dev Hugging Face (opens in a new tab)Available for download Flux.1 Schnell GitHub repository (opens in a new tab)Flux.1 Schnell on Hugging Face (opens in a new tab)
API AccessFLUX.1 [pro] API (opens in a new tab)Flux.1 Pro Replicate API (opens in a new tab)Flux.1 Pro FAL AI API (opens in a new tab)Flux.1 Pro Mystic AI API (opens in a new tab)Flux.1 Dev Replicate API (opens in a new tab)Flux.1 Dev FAL AI API (opens in a new tab)Mystic AI (opens in a new tab)Flux.1 Schnell Replicate API (opens in a new tab)Try Flux.1 Schnell on FAL AI (opens in a new tab)Flux.1 Schnell Mystic AI API (opens in a new tab)
Use CaseProfessional use, enterprise customizationDevelopment and personal usePersonal and commercial use

For more information, visit the Flux.1 repository: https://github.com/black-forest-labs/flux (opens in a new tab)

Flux.1 ComfyUI Hardware Requirements

Minimum VRAM: 8-12GB or above (slower generation speed) Recommended VRAM : 16-24GB

Currently, there are many open source community versions available with lower hardware requirements, such as GGUF versions, with a minimum VRAM requirement of 6GB.

Flux.1 Official and Open Source Community Version Download Address

Flux.1 currently has 3 models released by the official, but only the Dev and Schnell versions are open source. Due to the high hardware requirements of Flux, many versions have been iterated by the open source community based on the original version, mainly including:

If there are new versions, I will also update them in this article, so don't forget to bookmark this article. The information corresponding to different versions is as follows. Although the table provides download links, I suggest downloading models separately according to different workflows rather than directly downloading the corresponding model files in the table.

AuthorModel NameCommercial UseControlNet and LoRA SupportFeaturesVRAM RequirementFile SizeDownload Address
Black Forest LabsFlux.1 DevNoSupportedNeed to download CLIP、VAE、UNET16GB+23.8GBDownload (opens in a new tab)
Black Forest LabsFlux.1 SchnellYesSupportedNeed to download CLIP、VAE、UNET16GB+23.8GBDownload (opens in a new tab)
ComfyUIFlux.1 Dev FP8NoSupportedMerge Clip and VAE, only need to download one model8GB+17.2GBDownload (opens in a new tab)
ComfyUIFlux.1 Schnell FP8YesSupportedMerge Clip and VAE, only need to download one model8GB+17.2GBDownload (opens in a new tab)
KijiaFlux.1 Dev FP8NoSupportedMerge Clip and VAE, only need to download one model8GB+Download (opens in a new tab)
KijiaFlux.1 Schnell FP8YesSupportedMerge Clip and VAE, only need to download one model8GB+Download (opens in a new tab)
lllyasvielFlux.1 Dev BNB NF4 V1NoSupportedMerge Clip and VAE, only need to download one model, need to install ComfyUI_bitsandbytes_NF4 plugin (opens in a new tab)6GB+11.5GBDownload (opens in a new tab)
lllyasvielFlux.1 Dev BNB NF4 V2NoSupportedMerge Clip and VAE, only need to download one model, need to install ComfyUI_bitsandbytes_NF4 plugin (opens in a new tab)6GB+12GBDownload (opens in a new tab)
City96Flux.1 Dev GGUFNoSupportedNeed to download CLIP、VAE、UNET , need to install ComfyUI-GGUF plugin (opens in a new tab)6GB+12GBDownload (opens in a new tab)
City96Flux.1 Schnell GGUFYesSupportedNeed to download CLIP、VAE、UNET , need to install ComfyUI-GGUF plugin (opens in a new tab)6GB+12GBDownload (opens in a new tab)

If you want to use Flux.1 in ComfyUI, you need to upgrade to the latest ComfyUI version. If you haven't updated ComfyUI yet, you can follow the articles below for upgrading or installation instructions.

💡

Below are 4 different versions of Flux.1 workflows. If your computer has a large amount of VRAM, you can consider using the Flux.1 original version workflow. If your computer has less VRAM or performance is not enough, it is recommended to directly use the GGUF version workflow.

Original version Flux.1 ComfyUI workflow guide

The original version workflow is more complex, requiring installation of multiple files. This tutorial includes two parts:

  • Download and install CLIP、VAE、UNET models
  • Flux.1 original version complex workflow, including Dev and Schnell versions, as well as low-memory version workflow examples

Part 1: Download and install CLIP、VAE、UNET models

Download ComfyUI flux_text_encoders clip models

ComfyUI flux_text_encoders on hugging face (opens in a new tab)

Model File NameSizeNoteLink
clip_l.safetensors246 MBDownload (opens in a new tab)
t5xxl_fp8_e4m3fn.safetensors (Recommended)4.89 GBFor lower memory usage (8-12GB)Download (opens in a new tab)
t5xxl_fp16.safetensors9.79 GBFor better results, if you have high VRAM and RAM(more than 32GB ram).Download (opens in a new tab)
  1. Download clip_l.safetensors
  2. Download t5xxl_fp8_e4m3fn.safetensors or t5xxl_fp16.safetensors Depend on your VRAM and RAM
  3. Place downloaded model files in ComfyUI/models/clip/ folder. Note: If you have used SD 3 Medium before, you might already have the above two models

Download FLux.1 VAE Model

FLUX.1-schnell on hugging face (opens in a new tab)

File NameSizeLink
ae.safetensors335 MBDownload (opens in a new tab)
  1. Downloaded the ae.safetensors model.
  2. Place downloaded model files in ComfyUI/models/vae folder.
  3. For identification, you can rename it to flux_ae.safetensors;

Download FLux.1 UNET Model

FLUX.1-schnell on hugging face (opens in a new tab)

File NameSizeLinkNote
flux1-schnell.safetensors23.8GBDownload (opens in a new tab)For lower memory usage
flux1-dev.safetensors23.8GBDownload (opens in a new tab)If you have high VRAM and RAM.
  1. Downloaded the flux1-schnell.safetensors
  2. Place downloaded model files in ComfyUI/models/unet/ folder

Part 2: Flux.1 ComfyUI Original Workflow Example

ComfyUI offical Flux.1 workflow example: https://comfyanonymous.github.io/ComfyUI_examples/flux/ (opens in a new tab) You can just save the image and load into Comfy!

Flux Dev ComfyUI workflow example

Flux Schnell ComfyUI workflow example

Flux under 12GB VRAM

https://civitai.com/posts/5006398 (opens in a new tab)

Comfy ORG FP8 Checkpoint version

The following Checkpoint models are provide by ComfyUI Org,you only need to download one model file, and you can use it directly.

Model NameFile SizeDownload Link
flux1-dev-fp817.2GBDownload (opens in a new tab)
flux1-schnell-fp817.2GBDownload (opens in a new tab)
  1. Download the model version you need
  2. Place in ComfyUI/models/checkpoints/

You can also use the Kijia Flux-FP8 (opens in a new tab),since the file names are similar, it is recommended to rename the file after downloading or create a separate folder to distinguish it.

Flux dev FP8 Checkpoint version workflow example

Flux Schnell FP8 Checkpoint version workflow example

NF4 Version Flux.1 Workflow

Author: lllyasviel (opens in a new tab) First, you need to install the corresponding plugin: https://github.com/comfyanonymous/ComfyUI_bitsandbytes_NF4 (opens in a new tab) Plugin installation instructions can be found at ComfyUI Plugin Installation Guide

NF4 Version Model Download

Model NameAddress
flux1-dev-bnb-nf4Download (opens in a new tab)

lllyasviel made two versions of the NF4 Flux model, please download the V2 version directly, this version has better details and effects

  1. Install the ComfyUI_bitsandbytes_NF4 plugin (opens in a new tab), if you don't know how to install the plugin, you can refer to ComfyUI Plugin Installation Guide
  2. Download the flux1-dev-bnb-nf4-v2 (opens in a new tab) file, and place the downloaded file in the comfyui/models/checkpoints directory

NF4 Version Flux.1 Workflow Example

GGUF Version Flux.1 Workflow

Author: City96 (opens in a new tab) Project Address: https://github.com/city96/ComfyUI-GGUF (opens in a new tab)

💡

City96 (opens in a new tab) provides multiple GGUF versions of the Flux model, if you don't know which version to download in the corresponding repository, here is a simple guide:

  • The larger the number after Q, the more VRAM is required, and the higher the image quality generated. For example, Q2 requires less VRAM but generates lower quality images, while Q8 requires more VRAM but generates higher quality images.
  • You can also determine the quality by the size of the model file; generally, larger files mean higher quality and more VRAM required.

Install Plugins and Download Models

  1. Download the Flux GGUF dev model (opens in a new tab) or the Flux GGUF schnell model (opens in a new tab) and place the model files in the comfyui/models/unet directory.
  2. Download t5-v1_1-xxl-encoder-gguf (opens in a new tab), and place the model files in the comfyui/models/clip directory.
  3. Download clip_l.safetensors (opens in a new tab) and place the model files in the comfyui/models/clip directory.
  4. Download ae.safetensors (opens in a new tab) and place the model files in the comfyui/models/vae directory, and rename it to flux_ae.safetensors.
  5. Install ComfyUI-GGUF (opens in a new tab) plugin, if you don't know how to install the plugin, you can refer to ComfyUI Plugin Installation Guide

GGUF Version Flux.1 Workflow Example

Run Flux.1 online

Here are some online methods provided by Black Forest Labs for utilizing or invoking the Flux.1 model.

huggingface FLUX.1-dev: https://huggingface.co/spaces/black-forest-labs/FLUX.1-dev (opens in a new tab)
huggingface FLUX.1-schnell: https://huggingface.co/spaces/black-forest-labs/FLUX.1-schnell (opens in a new tab)
replicate: https://replicate.com/black-forest-labs (opens in a new tab)
mystic.ai: https://www.mystic.ai/black-forest-labs (opens in a new tab)
fal.ai: https://fal.ai/models/fal-ai/flux/schnell (opens in a new tab)

ComfyUI and Windows System Configuration Adjustments

The following steps are designed to optimize your Windows system settings, allowing you to utilize system resources to their fullest potential. Additionally, when running the Flux.1 model with ComfyUI, please refrain from running other software to minimize memory usage.

Windows Virtual Memory Setting

windows virtual memory setting

Trouble shooting

  1. Running out of memory Warning

Use the single file fp8 version

  1. Solving Performance Issues
    https://github.com/comfyanonymous/ComfyUI/discussions/4457 (opens in a new tab)

Flux.1 resources

Flux GGUF quants

The GGUF quants are there: https://huggingface.co/city96/FLUX.1-dev-gguf (opens in a new tab) Here's the node to load them: https://github.com/city96/ComfyUI-GGUF (opens in a new tab) via: https://www.reddit.com/r/StableDiffusion/comments/1eslcg0/excuse_me_gguf_quants_are_possible_on_flux_now/ (opens in a new tab)

Flux LoRA

https://huggingface.co/XLabs-AI/flux-RealismLora (opens in a new tab) photorealism for FLUX.1-dev model by Black Forest Labs https://huggingface.co/alvdansen/frosting_lane_flux (opens in a new tab) alvdansen/frosting_lane_flux https://huggingface.co/alvdansen/softserve_anime (opens in a new tab) alvdansen/softserve_anime https://huggingface.co/davisbro/half_illustration (opens in a new tab) davisbro/half_illustration https://huggingface.co/Shakker-Labs/FLUX.1-dev-LoRA-AntiBlur (opens in a new tab) AntiBlur Flux.1 LoRA and other resources, you can download on civitai (opens in a new tab)
XLabs-AI/flux-lora-collection: https://huggingface.co/XLabs-AI/flux-lora-collection (opens in a new tab)

Tip: The latest version of ComfyUI is prone to excessive graphics memory usage when using multiple FLUX Lora models, and this issue is not related to the size of the LoRA models. Even high-end graphics cards like the NVIDIA GeForce RTX 4090 are susceptible to similar issues. You might consider using the GGUF version of the model, or alternatively, employ Xlab's LoRA to load the ComfyUI workflow as a potential solution to this issue.

Flux LoRA Online training tool

Dead simple web UI for training FLUX LoRA with LOW VRAM (12GB/16GB/20GB) support. https://github.com/cocktailpeanut/fluxgym (opens in a new tab)

Flux LoRA Online training tool

Replicate offers a training tool called "ostris/flux-dev-lora-trainer (opens in a new tab)," which allows you to train your own Lora-style model with a minimum of just 10 images. You can give it a try.

  • Pirce: Trainings for this model run on Nvidia H100 GPU hardware, which costs $0.001528 per second.
  • How to Train: Read thisdocument (opens in a new tab)
  • License: All Flux-Dev LoRAs have the same license as the original base mode for FLUX.1-dev

FLUX.1 Training by Ostris https://colab.research.google.com/drive/1r09aImgL1YhQsJgsLWnb67-bjTV88-W0 (opens in a new tab) Train Flux LoRA by FAI https://fal.ai/models/fal-ai/flux-lora-general-training?a=1 (opens in a new tab) DreamBooth training example for FLUX.1 [dev] https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/README_flux.md (opens in a new tab)

Flux ControlNet

Flux ControlNet collections: https://huggingface.co/XLabs-AI/flux-controlnet-collections (opens in a new tab)
InstanX Flux unnioon Controlnet: https://huggingface.co/InstantX/FLUX.1-dev-Controlnet-Union-alpha (opens in a new tab) FLUX-Controlnet-Inpainting: https://github.com/alimama-creative/FLUX-Controlnet-Inpainting (opens in a new tab)

Flux IP-Adapter

IP-Adapter checkpoint for FLUX.1-dev model by Black Forest Labs https://huggingface.co/XLabs-AI/flux-ip-adapter (opens in a new tab)

Flux workflow example

Find more workflow example on: https://openart.ai/workflows/all?keyword=flux (opens in a new tab)