Guide: Train Your First FLUX LoRA in Under 6 Hours
LoRA (Low-Rank Adaptation) lets you fine-tune a model on your own images without training from scratch. This guide covers building a character or style LoRA for FLUX Dev using Kohya SS โ the most reliable training tool available.
#Hardware Requirements
| GPU | VRAM | Training Time (10 epochs) |
|---|---|---|
| RTX 5080 | 16GB | ~2โ3 hours |
| RTX 4090 | 24GB | ~1.5โ2 hours |
| RTX 3080 16GB | 16GB | ~4โ5 hours |
| RTX 3080 10GB | 10GB | Requires gradient checkpointing |
Minimum: 10GB VRAM with 8-bit Adam optimizer.
Hardware Partner
Running these workflows? ComputeAtlas.ai helps you find the right GPU
Optimization is only half the battle. Get precise VRAM benchmarks and hardware recommendations tailored for ComfyUI.
Check GPU Prices โ#Step 1 โ Dataset Preparation
Quality of training data is 80% of your result.
Image Requirements
- โQuantity: 15โ50 images (character LoRA), 50โ200 (style LoRA)
- โResolution: 1024x1024 minimum, consistent aspect ratio
- โVariety: Different angles, lighting, expressions (character), or diverse examples (style)
- โQuality: Sharp, no compression artifacts, no watermarks
Folder Structure
The number before the underscore (10_) is the repeat count โ how many times each image is shown per epoch. For small datasets (15โ20 images), use 10โ15. For larger datasets (50+), use 3โ5.
#Step 2 โ Auto-Captioning
Every image needs a text caption. Use WD14 tagger for automatic captioning.
Edit the captions โ Add your trigger word to the start of every caption:
Your trigger word (mycharcterv1) is what you type in prompts to activate the LoRA later.
#Step 3 โ Install Kohya SS
#Step 4 โ Training Configuration
Create flux_lora_config.toml:
Key Parameters Explained
network_dim (rank) โ Controls LoRA size. Higher = more capacity, more VRAM.
- โCharacter LoRA:
32 - โStyle LoRA:
16โ64 - โConcept LoRA:
8โ16
network_alpha โ Usually set to half of dim. Controls learning rate scaling.
learning_rate โ Start at 1e-4. If results are too strong, lower to 5e-5.
max_train_epochs โ 8โ12 for character, 5โ8 for style.
#Step 5 โ Run Training
RTX 5080 Performance
Watch the loss curve โ it should decrease steadily. If it plateaus early, lower the learning rate.
#Step 6 โ Evaluate Your LoRA
Test your LoRA in ComfyUI after each saved checkpoint:
Good signs:
- โSubject is recognizable at weight 0.7โ0.9
- โPrompt still controls other elements (background, lighting)
- โNo artifacts or distortion
Bad signs:
- โOnly activates at weight 1.0+ (undertrained)
- โBreaks non-subject elements (overtrained)
- โFlickering or artifacts (learning rate too high)
#Step 7 โ Export and Use
Your trained LoRA is saved as a .safetensors file in your output directory.
#Common Issues
OOM at start โ Enable gradient_checkpointing = true and reduce batch_size to 1.
Loss not decreasing โ Check your captions are correct and trigger word is consistent.
Subject not activating โ Increase LoRA weight, or train more epochs.
Overfit (everything looks like subject) โ Reduce epochs or increase dataset variety.
Slow training โ Ensure cache_latents = true and mixed_precision = "bf16".
Hardware Partner
Running these workflows? ComputeAtlas.ai helps you find the right GPU
Optimization is only half the battle. Get precise VRAM benchmarks and hardware recommendations tailored for ComfyUI.
Check GPU Prices โ