Australia/Sydney
BlogAugust 15, 2024

How to Install Flux AI Models Locally for Image Generation Easily

Fahd Mirza
n

 This video shows how to install Flux.1-Dev and Flux.1-Schnell model locally in comfyUI and how to generate midjourney like images.



Code:

conda create -n comfy python=3.11 -y && conda activate comfy

git clone https://github.com/comfyanonymous/ComfyUI.git && cd ComfyUI

pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121

pip install -r requirements.txt

python3 main.py

http://localhost:8188

cd ComfyUI/models/clip AND COPY clip_l.safetensors  & t5xxl_fp16.safetensors FROM https://huggingface.co/comfyanonymous/flux_text_encoders/tree/main

cd ComfyUI/models/vae/ AND COPY  ae.safetensors FROM https://huggingface.co/black-forest-labs/FLUX.1-dev

cd ComfyUI/models/unet/ AND COPY  flux1-dev.safetensors FROM https://huggingface.co/black-forest-labs/FLUX.1-dev

cd ComfyUI/models/loras/ AND COPY flux_realism_lora.safetensors
 FROM https://huggingface.co/comfyanonymous/flux_RealismLora_converted_comfyui/tree/main
 
Go To https://comfyanonymous.github.io/ComfyUI_examples/flux/  
n
n
Share this post:
On this page

Let's Partner

If you are looking to build, deploy or scale AI solutions — whether you're just starting or facing production-scale challenges — let's chat.

Subscribe to Fahd's Newsletter

Weekly updates on AI, cloud engineering, and tech innovations