Flux & ComfyUI

ComfyUI

Before starting, make sure you have ComfyUI installed on your computer. If you haven't done so yet, the simplest method is to head to the releases page and download the latest ComfyUI_windows_portable_nvidia.7z. Extract it to a safe location. For this example I chose my home folder.

Comfy Download Location

Method 1: Flux FP8 Checkpoint

For Method 1, we will be using ComfyUI's checkpoint as it runs better on limited systems. You'll need to create an account on huggingface. After that, you can download the file from this link. Once downloaded, add the model to <PathToComfyUI>/ComfyUI/models/checkpoints/.

Place Checkpoint

You are done, you can now open ComfyUI using the run_nvidia_gpu.bat and drag and drop the Method 1: Test Image into the ComfyUI window. Run Comfy

Method 2: Flux Dev

For Flux dev you are going to need the following files, You should probably start by downloading these. Again you will need to log in to huggingface

Now place them in the following directories

  • flux1_dev.safetensors goes into ComfyUI\models\unet
  • clip_l.safetensors and 5xxl_fp16.safetensors go into ComfyUI\models\clip
  • ae.safetensors will go into ComfyUI\models\vae

Running

Double-click the run_nvidia_gpu.bat, and the UI should open in a new browser window. You can now drag and drop a test image into your ComfyUI window and see how it was made. You can queue the workflow to create a similar image or change the prompts to experiment with different results.

Method 1: Test Image

Method 1 Test Image

Method 2: Test Image

Method 2 Test Image

If you want to generate the exact same image, you can click the "RandomNoise" block and change "controlaftergenerate" to "fixed". This can be useful for re-renders.

ComfyUI Manager

While using the site and dragging and dropping posts to ComfyUI, you might notice that some blocks are missing. A potential solution for this is to install ComfyUI-Manager. The simplest installation method involves installing Git. Then, open your terminal, cd to <PathToComfyUI>/ComfyUI/custom_nodes, and run the following command: git clone https://github.com/ltdrdata/ComfyUI-Manager.git

Comfy Manager Install

After this you can run can close comfy by hitting ctrl+c and then y on the console window and then reopening using the run_nvidia_gpu.bat. Now if you have missing nodes the manager will try to find and download them for you, you can also download new models and plugins direct from the manager.


By Ev Ev on Oct. 3, 2024, 2:53 a.m.