Skip to content

Flux Text-to-Image Tutorial ​

Learn to use Flux model for text-to-image generation.

Flux Model Introduction ​

Flux is the latest image generation model by Black Forest Labs, with excellent prompt following.

Model Versions ​

VersionFeaturesUse Case
Flux.1 DevOpen source, high qualityQuality pursuit
Flux.1 SchnellFast, 4-8 stepsQuick preview
Flux.1 ProClosed APIBest results

Installation ​

Download Models ​

ComfyUI/models/unet/
flux1-dev.safetensors    # Dev version (~23GB)
flux1-schnell.safetensors # Schnell version

Download VAE ​

Flux needs separate VAE:

ComfyUI/models/vae/
flux_vae.safetensors     # Flux VAE

Basic Workflow ​

┌─────────────┐    ┌─────────────┐    ┌─────────────┐    ┌─────────────┐
│ LoadCheckp │ →  │ CLIPTextEn │ →  │ KSampler   │ →  │ VAEDecode  │
│ oint       │    │ code (x2)  │    │            │    │            │
└─────────────┘    └─────────────┘    └─────────────┘    └─────────────┘
     CLIPTextEncode  CLIPTextEncode

Sampling Settings ​

ParameterValueDescription
Steps20-50More steps, higher quality
CFG3.5-7Flux less sensitive to CFG
DPM++ 2MRecommendedSampler
KarrasOptionalSmoother

Schnell Version ​

ParameterValue
Steps4-8
CFG1.0

Prompt Tips ​

Clear Description ​

bash
# Clear
a beautiful sunset over the ocean, golden hour lighting, cinematic

# Avoid too long
1 girl, beautiful face, long hair, blue eyes, smile, 8k, detailed

Quality Tags ​

TagEffect
8k, high detailMore details
masterpieceQuality boost
best qualityHigh quality
photorealisticRealistic style

Style Control ​

bash
# Art style
oil painting style, impressionist

# Photography style
shot on Canon 5D, film grain

# Illustration
digital art, flat illustration

Negative Prompt ​

Flux needs less negative prompting, but can add:

bash
# Common negatives
blurry, low quality, distorted, ugly

Image Sizes ​

SizeUse
512x512Quick preview
768x768Balance
1024x1024High quality
CustomAs needed

Advanced ​

LoRA Support ​

Flux supports LoRA:

1. Use Apply Flux LoRA node
2. Set LoRA strength 0.5-0.8
3. Adjust CFG strength

ControlNet ​

Flux supports ControlNet:

1. Load ControlNet
2. Preprocess image
3. Adjust control weight 0.5-0.8

Troubleshooting ​

Q: Slow generation ​

A:

  • Use Schnell version
  • Reduce steps
  • Use quantized models (FP8)

Q: Poor results ​

A:

  • Check prompt clarity
  • Try different CFG values
  • Increase steps

Q: Out of VRAM ​

A:

  • Use FP8 quantization
  • Reduce image size
  • Close other applications

Next Steps ​