Skip to content

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/

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 LicenseApache2.0, Commercial use allowed
Model DownloadNot available for downloadAvailable for download Flux.1 Dev GitHub repositoryFlux.1 Dev Hugging FaceAvailable for download Flux.1 Schnell GitHub repositoryFlux.1 Schnell on Hugging Face
API AccessFLUX.1 [pro] APIFlux.1 Pro Replicate APIFlux.1 Pro FAL AI APIFlux.1 Pro Mystic AI APIFlux.1 Dev Replicate APIFlux.1 Dev FAL AI APIMystic AIFlux.1 Schnell Replicate APITry Flux.1 Schnell on FAL AIFlux.1 Schnell Mystic AI API
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

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
Black Forest LabsFlux.1 SchnellYesSupportedNeed to download CLIP、VAE、UNET16GB+23.8GBDownload
ComfyUIFlux.1 Dev FP8NoSupportedMerge Clip and VAE, only need to download one model8GB+17.2GBDownload
ComfyUIFlux.1 Schnell FP8YesSupportedMerge Clip and VAE, only need to download one model8GB+17.2GBDownload
KijiaFlux.1 Dev FP8NoSupportedMerge Clip and VAE, only need to download one model8GB+Download
KijiaFlux.1 Schnell FP8YesSupportedMerge Clip and VAE, only need to download one model8GB+Download
lllyasvielFlux.1 Dev BNB NF4 V1NoSupportedMerge Clip and VAE, only need to download one model, need to install ComfyUI_bitsandbytes_NF4 plugin6GB+11.5GBDownload
lllyasvielFlux.1 Dev BNB NF4 V2NoSupportedMerge Clip and VAE, only need to download one model, need to install ComfyUI_bitsandbytes_NF4 plugin6GB+12GBDownload
City96Flux.1 Dev GGUFNoSupportedNeed to download CLIP、VAE、UNET , need to install ComfyUI-GGUF plugin6GB+12GBDownload
City96Flux.1 Schnell GGUFYesSupportedNeed to download CLIP、VAE、UNET , need to install ComfyUI-GGUF plugin6GB+12GBDownload

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

Model File NameSizeNoteLink
clip_l.safetensors246 MBDownload
t5xxl_fp8_e4m3fn.safetensors (Recommended)4.89 GBFor lower memory usage (8-12GB)Download
t5xxl_fp16.safetensors9.79 GBFor better results, if you have high VRAM and RAM(more than 32GB ram).Download
  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

File NameSizeLink
ae.safetensors335 MBDownload
  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

File NameSizeLinkNote
flux1-schnell.safetensors23.8GBDownloadFor lower memory usage
flux1-dev.safetensors23.8GBDownloadIf 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/ 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

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
flux1-schnell-fp817.2GBDownload
  1. Download the model version you need
  2. Place in ComfyUI/models/checkpoints/

You can also use the Kijia Flux-FP8 ,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 First, you need to install the corresponding plugin: https://github.com/comfyanonymous/ComfyUI_bitsandbytes_NF4 Plugin installation instructions can be found at ComfyUI Plugin Installation Guide

NF4 Version Model Download

Model NameAddress
flux1-dev-bnb-nf4Download

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, 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 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 Project Address: https://github.com/city96/ComfyUI-GGUF

💡

City96 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 or the Flux GGUF schnell model and place the model files in the comfyui/models/unet directory.
  2. Download t5-v1_1-xxl-encoder-gguf, and place the model files in the comfyui/models/clip directory.
  3. Download clip_l.safetensors and place the model files in the comfyui/models/clip directory.
  4. Download ae.safetensors and place the model files in the comfyui/models/vae directory, and rename it to flux_ae.safetensors.
  5. Install ComfyUI-GGUF 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
huggingface FLUX.1-schnell: https://huggingface.co/spaces/black-forest-labs/FLUX.1-schnell
replicate: https://replicate.com/black-forest-labs
mystic.ai: https://www.mystic.ai/black-forest-labs
fal.ai: https://fal.ai/models/fal-ai/flux/schnell

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

Flux.1 resources

Click here for more Flux resources

Flux GGUF quants

The GGUF quants are there: https://huggingface.co/city96/FLUX.1-dev-gguf Here’s the node to load them: https://github.com/city96/ComfyUI-GGUF via: https://www.reddit.com/r/StableDiffusion/comments/1eslcg0/excuse_me_gguf_quants_are_possible_on_flux_now/

Flux LoRA

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

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

Flux LoRA Online training tool

Replicate offers a training tool called “ostris/flux-dev-lora-trainer,” 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
  • 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 Train Flux LoRA by FAI https://fal.ai/models/fal-ai/flux-lora-general-training?a=1 DreamBooth training example for FLUX.1 [dev] https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/README_flux.md

Flux ControlNet

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

Flux IP-Adapter

IP-Adapter checkpoint for FLUX.1-dev model by Black Forest Labs https://huggingface.co/XLabs-AI/flux-ip-adapter

Flux workflow example

Find more workflow example on: https://openart.ai/workflows/all?keyword=flux