Installing Flux AI Model on ComfyUI: A Step-by-Step Guide

Flux is a family of text-to-image diffusion models developed by Black Forest Labs. As of Aug 2024, it is the best open-source image model you can run locally on your PC, surpassing the quality of SDXL and Stable Diffusion 3 medium.

The Flux.1 dev AI model has very good prompt adherence, generates high-quality images with correct anatomy, and is pretty good at generating text.

In this tutorial, you will learn how to install a few variants of the Flux models locally on your ComfyUI.

  • The single-file version for easy setup.
  • The fast version for speedy generation.
  • The regular version for the highest quality.

Software

We will use ComfyUI, an alternative to AUTOMATIC1111.

Read the ComfyUI installation guide and ComfyUI beginner’s guide if you are new to ComfyUI.

Take the ComfyUI course to learn ComfyUI step-by-step.

Flux AI Model variants

The following variants are available on ComfyUI

  1. Single-file FP8 version: This reduced-precision model is self-contained in a single checkpoint file. It is easy to use and requires less VRAM. (16GB)
  2. Flux Schnell version: A distilled 4-step model reducing quality in exchange for faster sampling times. (16GB)
  3. Regular FP16 version: This is the full-precision version which has slightly higher quality. You need higher VRAM. (24 GB)

Starts with the Single-file FP8 version if this is your first time using Flux.

Single-file Flux FP8 model on ComfyUI

This is the easiest way to use Flux with a single checkpoint model file. ComfyUI has native support for Flux.

You need 16 GB of VRAM to run this workflow.

Step 1: Download the Flux AI model

Download the Flux1 dev FP8 checkpoint.

Put the model file in the folder ComfyUI > models > checkpoints.

Step 2: Update ComfyUI

ComfyUI has native support for Flux starting August 2024. You need to update your ComfyUI if you haven’t already since then.

The easiest way to update ComfyUI is through the ComfyUI Manager. Click Manager > Update All.

Make sure to reload the ComfyUI page after the update — Clicking the restart button is not enough.

Step 3: Load Flux dev workflow

Download the Flux1 dev FP8 workflow JSON file below.

Drop it to your ComfyUI. Update ComfyUI and reload the page if you see red boxes.

Press Queue Prompt to generate an image.

Photo of a cute woman, in kitchen cooking turkey, looking at viewer, left hand fixing her beatuiful hair, holding a kitchen knife on the right hand.

Flux Fast model (Schnell)

The Flux Schnell is for you if you feel the Flux dev FP8 model is too slow. It is a distilled model with FP8 precision that can produce high quality images with 4 steps. The tradeoff is a bit lower quality.

You need 16 GB of VRAM to run this workflow.

Step 1: Download the Flux AI Fast model

Download the Flux1 Schnell model.

Put the model file in the folder ComfyUI > models > unet.

Step 2: Download the CLIP models

Download the following two CLIP models and put them in ComfyUI > models > clip.

Step 3: Download the VAE

Download the Flux VAE model file. Put it in ComfyUI > models > vae.

Step 4: Update ComfyUI

ComfyUI has native support for Flux starting August 2024. Update ComfyUI if you haven’t already.

The easiest way to update ComfyUI is through the ComfyUI Manager. Click Manager > Update All.

Make sure to reload the ComfyUI page after the update — Clicking the restart button is not enough.

Step 5: Load Flux dev workflow

Download the Flux1 dev FP8 workflow JSON file below.

Drop it to your ComfyUI. Update ComfyUI and reload the page if you see red boxes.

Press Queue Prompt to generate an image.

Photo of a cute woman, in kitchen cooking turkey, looking at viewer, left hand fixing her beatuiful hair, holding a kitchen knife on the right hand.

The distilled model is not as good as Flux1 dev. The images are less coherent, and the quality is lower. So only use it if you need fast generation and tolerate lower quality.

Flux dev full model

Use this workflow if you have a GPU with 24 GB of VRAM and are willing to wait longer for the highest-quality image.

Step 1: Download the Flux AI Fast model

Download the Flux1 Schnell model.

Put the model file in the folder ComfyUI > models > checkpoints.

Step 2: Download the CLIP models

Download the following two CLIP models, and put them in ComfyUI > models > clip.

Step 3: Download the VAE

Download the Flux VAE model file. Put it in ComfyUI > models > vae.

Step 4: Update ComfyUI

ComfyUI has native support for Flux starting August 2024. Update ComfyUI if you haven’t already.

The easiest way to update ComfyUI is through the ComfyUI Manager. Click Manager > Update All.

Make sure to reload the ComfyUI page after the update — Clicking the restart button is not enough.

Step 5: Load Flux dev workflow

Download the Flux1 dev regular (FP16) workflow JSON file below.

Drop it to your ComfyUI. Update ComfyUI and reload the page if you see red boxes.

Press Queue Prompt to generate an image.

Related Posts