November 5, 2024

Install ComfyUI and Install Flux 1. Dev in ComfyUI in Windows

In this tutorial, we explain how to install ComfyUI and how to install Flux 1. Dev in ComfyUI locally in a Windows operating system. The YouTube video accompanying this tutorial is given below.

Here is the summary of the installation procedure:

  • Install ComfyUI
  • Download all the Flux1 files (safetensors, VAE, etc) and copy them to the appropriate ComfyUI folders
  • Setup the ComfyUI workflow
  • Run the model

I am running the model on a 2-year-old desktop computer with an Intel multicore processor and with 48 GB RAM. The GPU is NVIDIA 3090 with 24 GB VRAM.

Note that it is advised to have at least 32 GB RAM. However, you can also run Flux 1 dev with lower precision models on a computer with less RAM. I did not test the installation on GPUs that are less powerful than NVIDIA 3090 and that have less VRAM. It would be useful for other viewers to write your experiences of running Flux1 dev and ComfyUI on your computer. You can leave a comment in the comment section in the YouTube video that comes with this tutorial.

Also, I will provide a link in the description below this video to all files that you need to download.

Step 1: Install ComfyUI

Go to the official release GitHub page:

https://github.com/comfyanonymous/ComfyUI/releases

and download the 7zip file of ComfyUI. Then download and install 7zip:

https://7-zip.org

Unzip the ComfyUI 7-zip file, and copy the complete folder somewhere.

Step 2: Download t5xxl_fp16.safetensors or clip_l.safetensors and copy them to the correct folders

You need to go to this link

https://huggingface.co/comfyanonymous/flux_text_encoders/tree/main

and to download the necessary files. If you have more than 32GB RAM it is recommended to download

t5xxl_fp16.safetensors and clip_l.safetensors

After downloading these files, copy them to ComfyUI/models/clip/ directory

On the other hand, if you have less than 32GB it is recommended to download

t5xxl_fp8_e4m3fn.safetensors and clip_l.safetensors

and copy them to the folder ComfyUI/models/clip/ directory

Step 3: Download VAE

Download the file ae.safetensors from

https://huggingface.co/black-forest-labs/FLUX.1-schnell/blob/main/ae.safetensors

and copy the file to the folder: ComfyUI/models/vae/

Step 4: Download Flux Dev model weights

Go to this website

https://huggingface.co/black-forest-labs/FLUX.1-dev

and download the file flux1-dev.safetensors

This file should be copied to ComfyUI/models/unet/.

Step 5: Open ComfyUI and automatically configure the workflow

Find the image from the website in the Flux Schell section

https://comfyanonymous.github.io/ComfyUI_examples/flux

and drag and drop it to the ComfyUI webpage flow. This will automatically set up the workflow and you can run everything. For more details, see the YouTube video tutorial.