When Black Forest Labs released FLUX.1, it set a new ceiling for text-to-image quality. The spatial coherence, prompt comprehension, and ability to spell complete English sentences on street signs or coffee mugs blew away everything we had been hacking together with SDXL and Cascade.
However, setting it up locally in ComfyUI has proven to be a minefield. Between the split weights (CLIP-L and T5-XXL), conflicting quantization formats (GGUF, NF4, FP8), and confusing memory arguments, half the developers attempting a local build end up staring at terminal errors or frozen viewports.
In this definitive guide, I will take you from a bare desktop to your first pristine 1024×1024 FLUX render. We will configure the proper folder structure, install the right dependencies, wire the nodes from scratch, and tune your startup flags so you never hit a random CUDA out-of-memory crash.
1. Choosing Your Flavour: FLUX.1 [dev] vs [schnell]
Before downloading a single gigabyte, you need to decide which model variant fits your machine and your workflow:
- FLUX.1 [dev]: The flagship 12-billion parameter model. It uses guidance distillation and requires between 20 and 28 sampling steps with a guidance scale around 3.5. It delivers top-tier micro-textures, photorealistic skin pores, and intricate hand anatomy. License: Non-commercial research/personal use.
- FLUX.1 [schnell]: The distilled 4-step version. It was trained to produce finished images in just 4 iterations with guidance scale set to 1.0. While fine detail on distant backgrounds is slightly softer than Dev, it renders in one-fourth of the time and runs under an Apache 2.0 open commercial license.
2. Hardware Reality Check
FLUX is a Diffusion Transformer (DiT), which demands significantly more compute bandwidth than the legacy UNet architecture used in Stable Diffusion 1.5 and SDXL. Here is the realistic hardware tier breakdown:
| Your Hardware (VRAM) | Recommended Model Format | Text Encoder Variant | Average Render Time (1024x1024) |
|---|---|---|---|
| 6GB VRAM (RTX 3050, 2060) | GGUF Q4_K_S | T5-XXL FP8 or Q4 GGUF | 90 – 130 seconds |
| 8GB – 10GB VRAM (RTX 3060, 3070, 4060) | GGUF Q4_K_M or NF4 V2 | T5-XXL FP8 | 35 – 55 seconds |
| 12GB – 16GB VRAM (RTX 3060 12GB, 4070, 4080) | FP8 (e4m3fn) or GGUF Q8_0 | T5-XXL FP8 | 18 – 28 seconds |
| 24GB VRAM (RTX 3090, 4090) | Pure FP16 or FP8 Dev | T5-XXL FP16 / FP8 | 9 – 14 seconds |
3. Step 1: Installing the ComfyUI Foundation
You have two paths to install ComfyUI: the official portable standalone zip (Windows) or the Git clone method (Windows & Linux). If you are on Windows, I strongly recommend the Portable Standalone build because it isolates Python, PyTorch, and CUDA libraries in a self-contained directory that won't mess with your system's global Python environment.
Option A: Windows Portable Build (Easiest)
- Head to the official ComfyUI GitHub Releases page and download the ComfyUI_windows_portable_nvidia_cu121_or_cpu.7z package.
- Extract the archive to the root of a fast NVMe SSD (e.g.,
C:\AI_Tools\ComfyUI_windows_portable). Avoid long paths with special characters or spaces. - Do not run the batch file just yet—we need to populate our model folders first.
Option B: Git Clone with Dedicated Virtual Environment
# 1. Clone the official repository
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
# 2. Create and activate a clean virtual environment
python -m venv venv
# On Windows:
venv\Scripts\activate
# On Linux:
source venv/bin/activate
# 3. Install PyTorch with CUDA 12.4 support
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
# 4. Install ComfyUI dependencies
pip install -r requirements.txt
4. Step 2: Downloading the Required Model Files
Unlike old SD 1.5 checkpoints where the text encoder, UNet, and VAE were all packed inside a single .safetensors file, FLUX is modular. You need three distinct components stored in their dedicated subdirectories:
Component A: The Diffusion Model (DiT)
Place your diffusion model in: ComfyUI/models/unet/ (or models/checkpoints/ if using an all-in-one NF4 file).
- For 12GB+ GPUs: Download
flux1-dev-fp8.safetensors(~11.9 GB) orflux1-schnell-fp8.safetensors. - For 6GB–10GB GPUs: Download
flux1-dev-Q4_K_S.gguf(~6.8 GB) from City96 on Hugging Face.
Component B: The Text Encoders
Place both text encoders in: ComfyUI/models/clip/
- clip_l.safetensors (~246 MB): The lightweight OpenAI CLIP-L model responsible for basic keyword understanding.
- t5xxl_fp8_e4m3fn.safetensors (~4.9 GB): The heavy Google T5-XXL language model. Never download the 9.5GB FP16 version unless you have dual 24GB GPUs. The FP8 version gives identical generation results while halving the memory footprint.
Component C: The Variational Autoencoder (VAE)
Place the VAE file in: ComfyUI/models/vae/
- ae.safetensors (~335 MB): The official 16-channel FLUX autoencoder.
t5xxl and clip_l files are inside ComfyUI/models/clip/, NOT inside models/text_encoders/. Placing them in the wrong directory will cause the DualCLIPLoader dropdown to show up empty.
5. Step 3: Installing the ComfyUI-GGUF Extension
If you are running GGUF quants (essential for GPUs with 10GB or less VRAM), ComfyUI needs a custom node to interpret the quantization headers:
- Open your terminal inside
ComfyUI/custom_nodes/. - Run:
git clone https://github.com/city96/ComfyUI-GGUF.git - If using the portable build, open
update\update_comfyui.batto ensure all dependencies are resolved.
6. Step 4: Building the Native FLUX Workflow
Now let's wire the nodes inside the ComfyUI canvas. Clear the default workflow by clicking Clear on the right-hand panel, then build the pipeline as follows:
1. Load the Models
- UNet Loader (or Unet Loader GGUF): Select your
flux1-dev-fp8.safetensorsorflux1-dev-Q4_K_S.gguf. - DualCLIPLoader: Set
clip_name1tot5xxl_fp8_e4m3fn.safetensorsandclip_name2toclip_l.safetensors. Set thetypeparameter to flux. - Load VAE: Select
ae.safetensors.
2. Configure the Conditioning
- Add two CLIP Text Encode (Prompt) nodes.
- Connect the
CLIPoutput of theDualCLIPLoaderto theclipinput of both text encoders. - Positive Prompt: Type your descriptive scene in the first encoder.
- FluxGuidance Node: Create a
FluxGuidancenode. Connect the positive prompt'sCONDITIONINGoutput to theconditioninginput ofFluxGuidance. Set theguidancevalue to 3.5 (for Dev) or 1.0 (for Schnell). - Negative Prompt: Leave the second encoder empty (FLUX was not trained on negative prompts, but ComfyUI requires a conditioning input). Connect it directly to the negative input of the sampler.
3. The Latent & Sampler Core
- EmptySD3LatentImage: Add this node to define the resolution. Set
widthto 1024 andheightto 1024,batch_sizeto 1. - KSampler:
- Connect
modelfrom your UNet Loader. - Connect
positivefrom theFluxGuidancenode output. - Connect
negativefrom your empty CLIP Text Encode. - Connect
latent_imagefromEmptySD3LatentImage. - Parameters:
seed: random •steps: 20 •cfg: 1.0 •sampler_name: euler •scheduler: simple •denoise: 1.0.
- Connect
- VAE Decode: Connect the
LATENToutput from KSampler tosamplesonVAE Decode, and connectvaefrom yourLoad VAEnode. - Save Image: Connect the decoded
IMAGEto a standardSave Imagenode.
7. Command Line Arguments: Unlocking Maximum VRAM Efficiency
Depending on your graphics card, open your run_nvidia_gpu.bat file in a text editor (Notepad) and modify the startup line:
For 6GB – 8GB GPUs:
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --lowvram --preview-method auto
For 12GB – 16GB GPUs:
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --normalvram --preview-method auto
For 24GB GPUs (Fastest):
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --highvram --gpu-only
8. Troubleshooting the Most Frustrating Setup Errors
1. DualCLIPLoader dropdown is completely blank
Cause: Your CLIP files are located in the wrong directory or are corrupted during download.
Fix: Verify that clip_l.safetensors and t5xxl_fp8_e4m3fn.safetensors are in ComfyUI\models\clip\. Restart ComfyUI completely.
2. "CUDA error: out of memory during VAE decode"
Cause: The 16-channel FLUX VAE requires a massive memory surge at the very end of generation when reconstructing the full-resolution image.
Fix: Replace the standard VAE Decode node with VAE Decode (Tiled). Set tile_size to 512. This processes the latent image in smaller patches, using less than 600MB of temporary VRAM.
3. The prompt is completely ignored, producing random abstract noise
Cause: The type toggle on the DualCLIPLoader is mistakenly set to sd3 or sdxl instead of flux.
Fix: Switch the selector to flux. This ensures ComfyUI routes the prompt tokens through both the CLIP and T5 layers with the correct positional embeddings.
Frequently Asked Questions
FluxGuidance node (typically set to 3.5). Setting traditional CFG above 1.0 in KSampler will cause double-guidance calculations, resulting in burnt highlights and distorted contrast.
Final Thoughts
Running FLUX locally takes some patience on initial setup, but once your weights are organized and your batch scripts are configured with the proper flags, you have complete ownership over one of the most powerful visual engines ever built. Zero credit limits, zero cloud queues, and zero unexpected privacy changes.
Need help with a custom node setup or hitting an unexpected trace? Join our community discussions or leave a comment on the FluxDraw Contact Page.

0 Comments