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)

Flux.1 ComfyUI Hardware Requirements

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

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

Here is a detailed introduction to the different versions of the Flux.1 model:

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 download, API access only FLUX.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)Available for download Flux.1 Dev GitHub repository (opens in a new tab)Flux.1 Dev Hugging Face (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)Available for download Flux.1 Schnell GitHub repository (opens in a new tab)Flux.1 Schnell on Hugging Face (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)

distilled Flux.1 fp8 version by Kijai

For most users, running the official model smoothly can be quite a challenge. Here, Kijai offer an optimized version of the FLUX.1 model by other authors that may provide a better experience.

https://huggingface.co/Kijai/flux-fp8/tree/main (opens in a new tab)

Version NameVRAM RequirementDownload Link
FLUX.1 [dev] fp8Minimum 12GB VRAMDownload Here (opens in a new tab)
FLUX.1 [schnell] fp8May lower than 12GB VRAM.Download Here (opens in a new tab)

Flux.1 ComfyUI setup install Guide

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 easy 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

Flux.1 ComfyUI 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)

Part2. Simple to use 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/

Flux dev FP8 Checkpoint version workflow example

Flux Schnell FP8 Checkpoint version workflow example

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)

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)

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

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 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)