flux-comfyui-workflows
flux-comfyui-workflows
On this page
TL;DR
title: "Flux ComfyUI Workflows: Base, GGUF, SDXL Refiner, 360°" description: "Flux workflows in ComfyUI — base text-to-image, GGUF for low VRAM, SDXL refiner for animals, equirectangular 360° panoramas." slug: flux-comfyui-workflows keywords: ["flux comfyui workflow", "flux gguf low vram", "flux sdxl refiner animals", "equirectangular 360 panorama flux lora", "flux schnell 4 steps"] updated: "2026-07-27" sources:
- "https://huggingface.co/black-forest-labs/FLUX.1-dev/tree/main"
- "https://huggingface.co/black-forest-labs/FLUX.1-schnell/tree/main"
- "https://huggingface.co/black-forest-labs/FLUX.1-dev/resolve/main/README.md"
- "https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/README.md"
- "https://huggingface.co/comfyanonymous/flux_text_encoders/tree/main"
- "https://comfyanonymous.github.io/ComfyUI_examples/flux/"
- "https://huggingface.co/Kijai/flux-fp8"
- "https://huggingface.co/XLabs-AI/flux-RealismLora"
- "https://civitai.com/models/192854"
- "https://civitai.com/models/735980"
- "https://civitai.com/models/745010"
- "https://github.com/city96/ComfyUI-GGUF"
- "https://github.com/evanspearman/ComfyMath"
- "https://github.com/Dobidop/ComfyStereo"
- "https://renderstuff.com/tools/360-panorama-web-viewer/"
- "https://civitai.com/articles/6464"
- "https://civitai.com/articles/6547"
- "https://civitai.com/articles/7287"
Flux ComfyUI Workflows: Base Graph, GGUF, SDXL Refiner, 360° Panoramas
- Use
flux1-dev.safetensorsinmodels/diffusion_models/with T5-XXL fp8 encoder for 12–16 GB VRAM;flux1-schnell.safetensorsinmodels/unet/runs in 4 steps at guidance 0. - Quantize with GGUF (Q4_K_S / Q5_K_M) via ComfyUI-GGUF; community reports Q4_K_S runs on 12 GB cards with minimal quality loss.
- For animals/creatures, chain Flux → SDXL (Ratatoskr) refiner pass; for 360° panoramas, use the SeanScripts LoRA + shift-inpaint seam fix workflow.
Base Text-to-Image Graph
Flux uses a rectified flow transformer (12 B parameters) with dual text encoders: CLIP-L and T5-XXL. The ComfyUI graph differs from SDXL in three ways. For a deeper dive on ComfyUI fundamentals, see ComfyUI node types and wiring.
| Component | File | ComfyUI Folder | Source |
|---|---|---|---|
| FLUX.1-dev model | flux1-dev.safetensors | models/diffusion_models/ | HF |
| FLUX.1-schnell model | flux1-schnell.safetensors | models/unet/ | HF |
| VAE | ae.safetensors | models/vae/ | HF |
| CLIP-L encoder | clip_l.safetensors | models/text_encoders/ | HF |
| T5-XXL fp16 | t5xxl_fp16.safetensors | models/text_encoders/ | HF |
| T5-XXL fp8 (scaled) | t5xxl_fp8_e4m3fn_scaled.safetensors | models/text_encoders/ | HF |
Key settings from the official examples
| Model | Steps | guidance_scale | max_sequence_length | License |
|---|---|---|---|---|
| FLUX.1-dev | 50 | 3.5 | 512 | Non-commercial |
| FLUX.1-schnell | 4 | 0.0 | 256 | Apache 2.0 |
Source: FLUX.1-dev README, FLUX.1-schnell README, ComfyUI Flux examples
Note: Community guides often cite 20 steps for dev; the official example uses 50. The 20-step setting is a speed/quality trade-off, not a model requirement.
Why Flux Renders Text Well
The T5-XXL encoder provides 512-token context with strong semantic grounding. Rectified flow learns straighter trajectories in latent space, preserving high-frequency glyph detail that diffusion models typically blur. HF FLUX.1-dev README
Negative Prompts
The standard Flux pipeline has no negative_prompt parameter; conditioning is controlled solely via guidance_scale. Community nodes add negative conditioning, but the base graph omits it entirely.
GGUF and Low-VRAM Variants
Quantization Options
ComfyUI-GGUF loads GGUF-quantized Flux checkpoints directly. The repository notes: "While quantization wasn't feasible for regular UNET models (conv2d), transformer/DiT models such as flux seem less affected by quantization." ComfyUI-GGUF
Common quantization levels for Flux:
| Quant | Approx. Size | VRAM (model only, est.) | Quality Note |
|---|---|---|---|
| Q8_0 | ~23 GB | ~24 GB | Near-lossless |
| Q5_K_M | ~15 GB | ~16 GB | Strong balance |
| Q4_K_S | ~12 GB | ~13 GB | Community reports work on 12 GB cards |
Exact VRAM depends on T5 encoder choice (fp16 ≈ 10 GB, fp8-scaled ≈ 5 GB) and offload settings. VRAM figures are community estimates; no official minimums published.
FP8 Checkpoints (Alternative)
Kijai publishes flux1-dev-fp8.safetensors and flux1-schnell-fp8.safetensors (float8_e4m3fn / float8_e5m2). ComfyUI examples caution: "fp8 degrades the quality a bit so if you have the resources the official full 16 bit version is recommended." ComfyUI Flux examples
T5 Encoder Memory Savings
| Encoder | File Size | VRAM Impact |
|---|---|---|
t5xxl_fp16.safetensors | 9.8 GB | ~10 GB |
t5xxl_fp8_e4m3fn_scaled.safetensors | 5.2 GB | ~5 GB |
Switching to the fp8-scaled encoder is the single largest VRAM reduction for Flux on consumer cards. For more on quantization trade-offs, see GGUF vs FP8 vs bitsandbytes.
Combining Flux with an SDXL Refiner Pass
Motivation
Flux excels at text, composition, and general coherence but community reports note weaker animal/creature/anthro fidelity. The workaround: generate a base image with Flux, then run an img2img pass through an SDXL fine-tune specialized for those domains.
Ratatoskr Refiner Workflow
- Flux txt2img → latent or pixel output
- SDXL img2img with
Ratatoskr(Civitai model 192854) at low denoise (0.2–0.4) - Optional: ControlNet (depth/canny) to preserve structure
The Civitai article describes the method as "use my model Ratatoskr as a refiner" Civitai 6547. The attached workflow (16 MB) was not publicly inspectable at research time; the integration pattern follows standard ComfyUI Flux→SDXL chaining.
Practical Settings
| Stage | Model | Denoise | Steps | CFG |
|---|---|---|---|---|
| Base | FLUX.1-dev | N/A | 20–50 | 3.5 |
| Refine | SDXL (Ratatoskr) | 0.25–0.35 | 15–25 | 5–7 |
Lower denoise preserves Flux composition; higher denoise injects more SDXL creature detail. For SDXL fine-tuning background, see Training SDXL LoRAs for characters.
Equirectangular 360° Panoramas
LoRA and Workflow
SeanScripts trained a Flux LoRA (Flux Equirectangular 360° Panorama, v3, trigger equirectangular 360) on professional equirectangular imagery. Civitai 735980 Updated workflow with annotations: Civitai 745010
The Seam Problem
Equirectangular projection maps sphere → rectangle: left/right edges meet at the back of the viewer. Standard generation produces a visible seam because the model has no cyclic consistency constraint.
Shift-Inpaint Seam Fix (Workflow Logic)
- Generate equirectangular image with LoRA
- Shift image 50 % horizontally (wrap mode)
- Inpaint the new center region (former seam) at low denoise
- Shift back 50 % → seamless 360° texture
The article describes: "shifting the image over halfway, then inpainting the center section of the image to remove the seam. Afterwards, it shifts back to get the original image composition." Civitai 7287
Optional Upscale Pass
For VR resolution, upscale 2× → low-denoise pass on both normal and shifted versions → shift back.
Required Custom Nodes
| Node Pack | Repository | Purpose |
|---|---|---|
| ComfyUI-GGUF | city96/ComfyUI-GGUF | GGUF model loading |
| ComfyMath | evanspearman/ComfyMath | Math ops for shift calculations |
| ComfyStereo | Dobidop/ComfyStereo | Stereo 3D panoramas (optional) |
Viewing the Output
- Web: renderstuff.com 360 viewer
- VR: SteamVR Media Player, Deo VR
- Metadata:
exiftool -XMP:ProjectionType="equirectangular" image.pnginjects Google-compatible projection tag
Quality Notes (Author Self-Report)
- Landscapes: strong results
- Indoor scenes: may need multiple seeds or extra img2img passes
Common Errors and Fixes
| Symptom | Cause | Fix | Source |
|---|---|---|---|
| OOM on 16 GB VRAM | T5-XXL fp16 ≈ 10 GB alone | Use t5xxl_fp8_e4m3fn_scaled.safetensors (~5 GB) | ComfyUI Flux examples |
| Flux dev not in checkpoint list | Model in checkpoints/ not diffusion_models/ | Move to ComfyUI/models/diffusion_models/ | ComfyUI Flux examples |
| Flux schnell not found | Model in checkpoints/ not unet/ | Move to ComfyUI/models/unet/ | ComfyUI Flux examples |
| Panorama has visible seam | No cyclic consistency in generation | Shift 50 % → inpaint center → shift back | Civitai 7287 |
| Quality drop with FP8 checkpoint | float8 precision loss | Use fp16 if VRAM allows | ComfyUI Flux examples |
FAQ
Why does FLUX.1-schnell use 4 steps while dev uses 50? Schnell is a student model distilled via latent adversarial diffusion distillation to match dev output in 1–4 steps. Dev uses guidance distillation and requires more steps for full quality. HF FLUX.1-schnell README
Do I need negative prompts with Flux? The base pipeline has no negative_prompt input; conditioning is controlled by guidance_scale (dev: 3.5, schnell: 0). Community nodes can add negative conditioning if desired. Can I run Flux on 12 GB VRAM? Community reports suggest it works with fp8 T5 encoder and/or GGUF Q4_K_S quantization. No official minimum is published. Civitai 6464
How do I fix the seam in 360 equirectangular images? Shift the image 50 % horizontally, inpaint the new center region at low denoise, then shift back. This is implemented in the SeanScripts workflow. Civitai 7287
What is the difference between fp8 and fp16 Flux checkpoints? FP8 (float8_e4m3fn) halves weight size but "degrades the quality a bit" per ComfyUI examples. Use fp16 when VRAM permits. ComfyUI Flux examples
Which T5 encoder should I pick for low VRAM? t5xxl_fp8_e4m3fn_scaled.safetensors (~5 GB) instead of t5xxl_fp16.safetensors (~10 GB). ComfyUI Flux examples
Is GGUF quantization safe for Flux? The ComfyUI-GGUF author states transformer/DiT models like Flux are "less affected by quantization" compared to conv-based U-Nets. ComfyUI-GGUF
Where do I put the Flux model files in ComfyUI?
flux1-dev.safetensors→models/diffusion_models/flux1-schnell.safetensors→models/unet/ae.safetensors→models/vae/- Text encoders →
models/text_encoders/
Sources
- FLUX.1-dev model card & files — filenames, sizes, license, architecture
- FLUX.1-schnell model card & files — filenames, sizes, license
- FLUX.1-dev README — steps, guidance, sequence length, distillation method
- FLUX.1-schnell README — steps, guidance, sequence length, distillation method
- Flux text encoders (ComfyUI) — CLIP-L, T5-XXL fp16/fp8 filenames and sizes
- ComfyUI Flux examples — folder layout, FP8 checkpoints, quality note, T5 fp8 recommendation
- Kijai FP8 repo — fp8_e4m3fn / fp8_e5m2 weights
- XLabs Realism LoRA — base model, license
- Ratatoskr SDXL model — animal/creature/furry fine-tune
- Flux Equirectangular LoRA — v3, trigger word
- Updated equirectangular workflow — annotated workflow
- ComfyUI-GGUF — GGUF loader, quantization viability statement
- ComfyMath — math nodes for shift/inpaint
- ComfyStereo — stereo panorama nodes
- renderstuff.com 360 viewer — web panorama viewer
- Civitai 6464 — base installation guide, VRAM claims, FP8 mention
- Civitai 6547 — Flux+SDXL refiner concept
- Civitai 7287 — equirectangular LoRA, seam fix, custom nodes, viewing methods