Are you tired of paying monthly subscription fees for cloud-based AI image generators like Midjourney or Dall-E? Do you worry about privacy, Learning how to run FLUX.1 and SDXL locally on your Windows PC is the ultimate solution.
Running open-source AI image generation models like FLUX.1 and SDXL (Stable Diffusion XL) locally on your Windows PC is the ultimate solution. With the right setup, you can generate photorealistic images, customized digital art, and professional graphics—100% free, completely offline, and without any usage limits.
In this step-by-step guide, we will walk you through setting up SDXL and FLUX.1 on Windows using lightweight, beginner-friendly tools like Stable Diffusion WebUI Forge and ComfyUI.
Why Run FLUX.1 and SDXL Locally?
Cloud services are convenient, but running open-source models on your local GPU provides distinct advantages:
- 100% Free & Unlimited: No monthly credits, subscriptions, or token limits. Generate as many images as your hard drive can store.
- Complete Privacy & Control: Your prompts, output images, and model choices never leave your local machine.
- No Censorship: Full creative freedom over styles, characters, and concepts.
- Deep Customization: Full support for custom LoRAs, ControlNets, and fine-tuned checkpoints from platforms like Civitai and Hugging Face.
Hardware Requirements for Local AI Image Generation
Before installing, check your PC hardware to ensure a smooth workflow.
Recommended System Specifications:
- Operating System: Windows 10 / Windows 11 (64-bit).
- Graphics Card (GPU): NVIDIA RTX 3060 / 4060 or better (NVIDIA GPUs with CUDA support offer the best performance).
- VRAM (Video Memory):
- 6 GB VRAM: Minimum requirement for SDXL (using quantized/optimised settings).
- 8 GB – 12 GB VRAM: Comfortable entry point for SDXL at native 1024×1024 resolution and lightweight FLUX.1 models (FLUX Schnell / Dev FP8).
- 16 GB+ VRAM: Recommended for heavy FLUX.1 workflows, high-batch generation, and fast upscaling.
- RAM: 16 GB minimum (32 GB recommended).
- Storage: At least 50 GB – 100 GB of free space on an NVMe SSD (loading multi-gigabyte models from traditional HDDs will cause severe bottlenecks).
Choosing Your Local Web Interface: Forge vs. ComfyUI
To generate images, you need a User Interface (UI) that connects your hardware to the AI models.
- Stable Diffusion WebUI Forge: Best for beginners and intermediate users. It features a classic, intuitive web interface with built-in memory optimizations (GGUF and FP8 support) that run FLUX and SDXL smoothly on lower VRAM GPUs.
- ComfyUI: Best for advanced users. A node-based visual workflow system that provides maximum flexibility and immediate day-one support for new AI architectures.
(For this guide, we will focus on WebUI Forge as it offers the fastest and easiest setup process.)
Step 1: Install System Prerequisites (Python & Git)
To run local AI tools, Windows needs two foundational software packages: Python and Git.
1. Install Python
- Download Python 3.10.11 (or 3.10.6) from the official Python website.
- CRITICAL STEP: During installation, check the box that says “Add Python to PATH” before clicking Install Now.
2. Install Git
- Download and run the Windows installer from
git-scm.com. - Keep all installation settings at their defaults and click Next until complete.
Step 2: Install WebUI Forge on Windows
Now, let’s deploy the WebUI Forge repository on your PC.
- Open your fast NVMe drive (e.g.,
C:\orD:\) and create a new folder namedAI_Generation. - Open Command Prompt (cmd) in Windows, type the following command, and press Enter:
git clone https://github.com/lllyasviel/stable-diffusion-webui-forge.git - Navigate into the cloned directory:
cd stable-diffusion-webui-forge - Double-click the
webui-user.batfile to launch the setup.
(Note: The initial run will automatically download necessary dependencies like PyTorch and CUDA drivers. This process takes 10 to 15 minutes depending on your internet speed.)
Once the installation finishes, WebUI Forge will automatically launch in your browser at http://127.0.0.1:7860.
Step 3: Download and Place SDXL & FLUX.1 Model Weights
AI models come in standalone checkpoint files (usually .safetensors format). You must download these weights and place them into the correct directory.
1. SDXL Models (Best for Ecosystem & LoRAs)
SDXL produces native 1024×1024 images with exceptionally rich detail.
- Where to download: Visit Civitai or Hugging Face.
- Popular Recommendations: Juggernaut XL, RealVisXL, or DreamShaper XL.
- Target Folder: Place downloaded
.safetensorsfiles into:stable-diffusion-webui-forge/models/Stable-diffusion/
2. FLUX.1 Models (Best for Photorealism & Typography)
FLUX.1 is a state-of-the-art open-weights image model known for incredible prompt adherence and accurate text rendering.
- FLUX.1 [schnell]: Ultra-fast model (generates images in just 4 steps).
- FLUX.1 [dev]: High-quality base model for ultimate detail.
- Target Folder: For WebUI Forge, place FLUX checkpoints directly into:
stable-diffusion-webui-forge/models/Stable-diffusion/
Step 4: Generating Your First Image
Now that your software and models are ready, it’s time to generate:
- In the WebUI Forge interface, click the Refresh button next to the top-left Checkpoint Dropdown.
- Select your downloaded SDXL or FLUX.1 model checkpoint.
- Set your parameters:
- Sampling Steps: 20–30 steps for SDXL (or 4–8 steps for FLUX Schnell).
- Resolution:
1024 x 1024(Native base size). - CFG Scale:
5.0 – 7.0for SDXL (1.0 – 3.5for FLUX).
- Enter a descriptive prompt into the Positive Prompt box, for example:
“A cinematic close-up portrait of a cybernetic mechanic working in a neon-lit workshop, highly detailed, 8k resolution, photorealistic.”
- Click Generate!
Within seconds, your GPU will process the prompt and render a high-resolution, watermark-free image directly on your computer.
Common Troubleshooting & Performance Tips
- Out of Memory (OOM) Errors: If your generation crashes with a CUDA memory error, open
webui-user.batwith Notepad and add launch arguments like--medvramor--lowvramto save GPU VRAM. - Black or Blank Images: This is usually a VAE precision issue. Ensure you are using FP16/FP8 precision settings or download a standalone SDXL VAE file into
models/VAE. - Slow Generation Speeds: Make sure WebUI Forge and your model files are stored on a fast NVMe SSD rather than a traditional HDD.
Final Thoughts
Setting up FLUX.1 and SDXL locally on Windows gives you complete ownership over your generative AI toolkit. By combining these powerful open-source models with lightweight web UIs like Forge, you can unlock professional-grade creative tools without paying a single dollar in subscription fees.