Run FLUX.1 dev and schnell in ComfyUI on Ubuntu (12GB VRAM)
This deep-dive covers comfyui flux ubuntu 12gb vram with actionable analysis, practical implications, and expert insights.
Why FP8 FLUX.1 in ComfyUI Works So Well on 12 GB Linux GPUs
Black Forest Labs' FLUX.1 architecture delivered a major leap in typography rendering, prompt adherence, and natural anatomy over SDXL. While the original 16-bit BF16 checkpoint consumes nearly 24 GB of VRAM, ComfyUI's native FP8 quantization and smart weight offloading let a 12 GB NVIDIA RTX 3060, 4070, or 4070 Super render crisp 1024x1024 images reliably on Ubuntu Linux.
Step 1: Install ComfyUI with CUDA PyTorch on Ubuntu
Create an isolated Python virtual environment and install PyTorch with CUDA 12.4 support:
sudo apt update
sudo apt install -y git python3-venv python3-pip libgl1 libglib2.0-0
git clone https://github.com/comfyanonymous/ComfyUI.git ~/ComfyUI
cd ~/ComfyUI
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
pip install -r requirements.txt
Step 2: Place FLUX.1 Model Files in the Exact Directories
ComfyUI requires four distinct files for a modular FLUX.1 pipeline (or a single all-in-one FP8 checkpoint). Verify the target directories carefully:
| Component | Recommended File (12 GB VRAM) | ComfyUI Directory |
|---|---|---|
| Diffusion Model | flux1-schnell-fp8.safetensors or flux1-dev-fp8.safetensors | models/diffusion_models/ (or models/checkpoints/ for all-in-one) |
| CLIP-L Encoder | clip_l.safetensors | models/text_encoders/ |
| T5-XXL Encoder | t5xxl_fp8_e4m3fn.safetensors | models/text_encoders/ |
| FLUX VAE | ae.safetensors | models/vae/ |
Download the text encoders cleanly via the Hugging Face CLI:
pip install huggingface_hub
huggingface-cli download comfyanonymous/flux_text_encoders \
clip_l.safetensors t5xxl_fp8_e4m3fn.safetensors \
--local-dir ~/ComfyUI/models/text_encoders
Place ae.safetensors in ~/ComfyUI/models/vae/ and your chosen FP8 FLUX checkpoint in ~/ComfyUI/models/diffusion_models/.
Step 3: Launch ComfyUI with Optimal 12 GB VRAM Flags
Start ComfyUI bound to localhost with asynchronous memory management enabled:
cd ~/ComfyUI
source .venv/bin/activate
python3 main.py --listen 127.0.0.1 --port 8188 --normalvram
If your machine has only 16 GB of system RAM alongside a 12 GB GPU, switch --normalvram to --lowvram so ComfyUI streams model blocks conservatively without triggering the Linux OOM killer.
Step 4: Recommended Node Settings for [schnell] vs [dev]
Open http://127.0.0.1:8188 and load the built-in FLUX workflow template (Workflow > Browse Templates > Flux). Use these tested sampler parameters:
| Setting | FLUX.1 [schnell] (Apache 2.0) | FLUX.1 [dev] (Non-Commercial) |
|---|---|---|
| Steps | 4 | 20 to 25 |
| Sampler | euler | euler |
| Scheduler | simple | simple or beta |
| KSampler CFG | 1.0 | 1.0 |
| FluxGuidance | Not required (or 1.0) | 3.5 |
| Resolution | 1024x1024 or 1344x768 (16:9) | 1024x1024 or 1344x768 (16:9) |
Step 5: Writing Effective FLUX.1 Prompts
Unlike older SD 1.5 models that relied on keyword soup like masterpiece, 8k, best quality, FLUX.1's T5-XXL encoder understands natural descriptive English. Describe the subject, lighting, camera angle, color palette, and composition in 2 to 3 clean sentences. For blog featured images, use 1344x768 (16:9 widescreen) and explicitly specify clean negative space and lighting mood.
Summary
By pairing FP8 FLUX.1 weights with t5xxl_fp8_e4m3fn.safetensors and ae.safetensors in ComfyUI, any 12 GB NVIDIA Linux workstation can generate studio-grade 16:9 illustrations locally in 5 to 20 seconds with full privacy and zero per-image API fees.
Was this technical analysis helpful?
Your feedback informs our benchmark updates and ongoing article audits.
FAQ
Frequently Asked Questions
Structured for search engines and AI answer systems (AEO/GEO).
Using the full 23 GB BF16 checkpoint or the FP16 T5-XXL text encoder overflows 12 GB VRAM. Switch both the diffusion model and T5-XXL to FP8 (t5xxl_fp8_e4m3fn.safetensors) and ensure you have at least 32 GB of system RAM for clean CPU offloading.
FLUX.1 [schnell] is Apache 2.0 licensed and distilled for 4-step rapid generation, making it ideal for commercial use and fast iteration. FLUX.1 [dev] is non-commercial, runs 20 to 28 steps, and yields slightly finer lighting and photorealism.
Check three settings: set KSampler CFG to 1.0 (FLUX uses FluxGuidance instead of standard CFG), confirm ae.safetensors is loaded as the VAE, and verify you did not accidentally select 4 steps with FLUX.1 [dev].
No. Because FLUX.1 uses guidance distillation at CFG 1.0, standard negative prompts are ignored and you do not need long lists of negative quality tags.
More answers in our FAQ hub.
Newsletter
Practical Linux & Applied AI Newsletter
Get new tested tutorials and benchmark comparisons delivered directly to your inbox. Zero spam.
Join Weekly guides readers getting our weekly digest.
- Practical Linux administration & terminal workflows
- Tested open-source AI setups & benchmarks
- Zero spam - unsubscribe anytime