Introducing Flux
To understand Flux better, we can look at the description provided on its Hugging Face page. However, the English text might be challenging to understand, so we can easily translate the page into Chinese.
The translation reveals that Flux is a 12 billion parameter AI generation program, which explains why its generated images are superior to those of Stable Diffusion.
Using Flux with ComfyUI
To start using Flux, we need to use ComfyUI. You’ll need the latest version of ComfyUI to access the Flux-related nodes. To begin, go to the ComfyUI website and download the Flux workflow.
After downloading the workflow, you’ll need to install the model, CLIP, and VAE. These can be found in the same download section. Let’s install them one by one.
The first step is to update ComfyUI to its latest version. You can do this by clicking “Update ComfyUI” in the Manager Menu. It’s best to save at least 16 GB of hard drive space for this process.
After updating, we go to the ComfyUI website again and download the Flux workflow. Unzip the file and drag it into the ComfyUI interface.
Now we need to download and install the model. We will download the Flux 1DVSFT model, which is 23.8 GB in size.
Once downloaded, we copy the model file and paste it into the ComfyUI Models folder. Next, we need to download the CLIP files. The CLIP files come in two options: FP8 and FP16. You will need to choose the version that works best for your host memory. For example, if your host memory is less than 32 GB, then you’ll need to download the FP8 version.
After downloading the CLIP files, copy them to the ComfyUI Models folder. Finally, we need to download the VAE file.
Once all of the files are downloaded, we refresh the ComfyUI interface. This allows the program to locate the new models and make them available for use.
Generating an Image with Flux
Now, we can start generating images with Flux. The first step is to write a prompt in the ComfyUI interface.
The VAE part may need to be set to the one we downloaded earlier. You can see the prompt I’m using in the image.
This prompt describes a girl sitting on a sofa in a living room, holding a cup of coffee. We press the “Run” button and wait for the image to generate.
The image generated by Flux looks pretty good, with nice details like the girl’s fingers. However, the process took 621.67 seconds to complete, which is quite long.
We can try changing the prompt to see if we can get a better result.
The new prompt includes a description of a white layer, which we hope will add some realism to the image. After running the prompt, we see that the image does look a little more realistic.
That concludes our introduction to Flux and its usage with ComfyUI. If you are interested in exploring AI image generation further, consider trying out Flux, which offers high-quality results with its 12 billion parameters.