Using Flux.1 locally is a great option for those looking to harness the full power of this AI image generation model without relying on an online platform. Here’s a detailed guide to installing and configuring Flux.1 on your local machine.
1. System requirements
Before you get started, make sure your computer has the following minimum specifications:
- GPU: A graphics card with at least 8 GB of VRAM (preferably 12 GB or more for better performance).
- RAM: A minimum of 16 GB RAM, although 32 GB is recommended for heavier models.
- Storage space: Prepare at least 50 GB of free space to store templates and dependencies.
2. Installing Comfy UI
Comfy UI is one of the most popular interfaces for using templates like Flux.1 locally.
- Download and install Comfy UI: Go to the GitHub repository for Comfy UI and follow the instructions to install the software. This process usually involves cloning the repository and installing the necessary Python dependencies via
pip
. - Initial configuration: Once Comfy UI has been installed, run it to make sure the interface is displayed correctly. If you encounter any problems, check that your Python environment is configured correctly and that all dependencies are installed.
3. Download and Installation of Flux.1
Flux.1 is available in several versions suitable for different hardware configurations.
Download Flux.1 template
Go to Hugging Face and search for the Flux.1 model (Schnell or Dev). The Schnell model is lighter and recommended if you have a more modest configuration, while the Dev model offers better quality for more powerful systems.
Place files in appropriate folders:
- Text templates: Place text template files in Comfy UI’s
models/clip
folder. - VAE (Variational Autoencoder): Download the recommended VAE template and place it in the
models/vae
folder. - UNet (Model Core): Flux.1’s main model should be placed in the
models/unet
folder. This is where you will place the downloadedsafetensors
files.
4. Configuring LoRAs for Increased Realism
Low-Rank Adaptation Models (LoRA) are extensions that improve the quality of Flux.1-generated images by fine-tuning specific details such as skin texture or shading.
- Downloading LoRA
- From Hugging Face, download Flux.1-compatible LoRA files, such as Flux.1 Realism LoRA.
- Installation: Place LoRA files in Comfy UI’s
models/lora
folder. - Configuration in Comfy UI: In the Comfy UI interface, load LoRA templates into your workflows for integration into image generation processes. This can usually be done by selecting LoRA in the UI options.
5. Launch Image Generation
- Workflow creation: In Comfy UI, create or load a workflow that incorporates the Flux.1 template and, if necessary, LoRAs.
- Adjusting Parameters: Adjust the
guidance scale
to 2.0 to avoid artificial rendering. Experiment with other parameters such as the number of inference steps to find the optimal configuration. - Image generation: Enter your prompt and launch the generation process. Depending on the complexity of the prompt and your system configuration, this can take from a few seconds to several minutes.
If you run into memory problems (insufficient GPU VRAM), you can switch to a lighter model or reduce the image resolution.
Comfy UI also offers options for adjusting weight types (such as FP16 or FP8), which can help reduce memory load while maintaining decent image quality.
If you encounter any errors or the template doesn’t load correctly, make sure you have the latest version of Comfy UI and that all file paths are correctly configured.
You can also consult the Comfy UI support forums or Hugging Face discussions for specific advice.
If local installation is too complicated, you can follow our tutorial to use Flux.1 with replicate.com: Flux.1: Tuto to create ultra-realistic AI images in a few clicks
AI NEWSLETTER
Stay on top of AI with our Newsletter
Every month, AI news and our latest articles, delivered straight to your inbox.
CHATGPT prompt guide (EDITION 2024)
Download our free PDF guide to crafting effective prompts with ChatGPT.
Designed for beginners, it provides you with the knowledge needed to structure your prompts and boost your productivity
With this ebook, you will:
✔ Master Best Practices
Understand how to structure your queries to get clear and precise answers.
✔ Create Effective Prompts
The rules for formulating your questions to receive the best possible responses.
✔ Boost Your Productivity
Simplify your daily tasks by leveraging ChatGPT’s features.
Similar posts
Flux 1.1 pro: A faster model with even more realistic AI images
The line between reality and fiction is becoming increasingly blurred thanks to constant advances in the field of artificial intelligence image generation. Black Forest Labs has just launched its new …
Flux.1, the new ultra-realistic image generator
Generative AI has not finished surprising us. Among recent innovations in this field, the Flux.1 model stands out as a true revolution for the generation of realistic and artistic images. …
How to generate ultra-realistic images locally with Flux.1?
Using Flux.1 locally is a great option for those looking to harness the full power of this AI image generation model without relying on an online platform. Here’s a detailed …