Notes on playing with FLUX.1
By reading these notes,
・You can try image generation with FLUX.1
Verification Environment
・OS : Windows 11
・Mem : 64GB
・GPU : GeForce RTX™ 4090
・Local (pyenv+venv)
・python 3.10.12
・As of August 2024
FLUX.1
A latest model with improved performance in various areas, created by the team newly formed by the developers of Stable Diffusion, the spark that ignited the image generation AI trend.
Let's give it a try!
Let's give it a try!
Preparation
Since we will be working using ComfyUI, we will first install it.
Environment Setup
It is very easy!
1. Download additional files
Here (Hugging Face) Download the following from here.
・flux1-dev.safetensors (23.8GB)
・ae.safetensors (335MB)
Here (Hugging Face) Download the following from here
・clip_l.safetensors (246MB)
・t5xxl_fp16.safetensors (9.79 GB)
・t5xxl_fp8_e4m3fn.safetensors (4.89GB)
*Use t5xxl_fp8 if you want to save memory.

2. Storing additional files
Store the downloaded files in the following structure.
ComfyUI
└─ models
├── unet
│ └── flux1-dev.safetensors
├── clip
│ ├── clip_l.safetensors
│ ├── t5xxl_fp16.safetensors
│ └── t5xxl_fp8_e4m3fn.sft
└── vae
└── ae.safetensors
3. Download image
Here Download the image from here.

Done!
Trying out FLUX.1
Let's generate an image.
1. Start ComfyUI with the following command
cd ComfyUI
.venv\scripts\activate
python main.py
2. Drag and drop the image you saved earlier into the UI screen to load the workflow


3. Select a model and write your desired prompt
Model: Default case

Model: If you want to save VRAM

Prompt

A photorealistic portrait of a fit elderly man working out on a beach. The man has a lean and muscular physique, showcasing a slim but toned build. In the background, there's a sign with the word 'No Smoking' written on it.
A photorealistic portrait of a healthy elderly man exercising on a beach. This man has a lean, muscular physique, boasting a slim yet toned build. In the background, there is a sign that says 'No Smoking'.
4. Start generation

5. Done

The output will be stored in ./output.
The end
I was able to generate images with FLUX.1.
It seems that a certain level of quality can be maintained even without negative prompts.
It is also attractive that you can give instructions in sentences rather than just a list of words.
It was also mentioned that compliance with fine details such as text has improved.
Thank you very much
I used this as a reference. Thank you.
