← ImageLoRA · All LoRA guides
FLUX.2 dev LoRA training with ai-toolkit: setup guide
Setting up ai-toolkit to train a FLUX.2 dev LoRA: support status, the settings known to work, and links to the docs. Status in ai-toolkit: supported (reference).
About ai-toolkit
Ostris' trainer with a web UI and YAML configs; widest day-0 support for new image models, and the easiest option for Flux/Krea. Sources: github.com/ostris/ai-toolkit, www.reddit.com/r/StableDiffusion/comments/1vrkd5x/which_platform_shoul
| Repo | ostris/ai-toolkit |
|---|
| GitHub stars | 12373 |
|---|
| Last commit | 2026-10-19 |
|---|
| Latest release | none published |
|---|
ai-toolkit-specific notes for FLUX.2 dev
- Start from ai-toolkit train_lora_flux_24gb.yaml
VRAM
80 GB recommended; ai-toolkit ships train_lora_flux_24gb.yaml
Settings that work for FLUX.2 dev (any trainer)
- Start from ai-toolkit train_lora_flux_24gb.yaml
- OneTrainer preview-2 branch (not master yet): LoRA on 8-bit quantized FLUX.2 trains ~1.3x faster with the 16 GB preset; DoRA not sped up
- diffusers v0.42.0 (Oct 23, PR #14163) loads LoKr adapters for FLUX.2 and FLUX.2 klein
- ComfyUI master (PR #17196) runs the FLUX.2 VAE in fp16: faster, closer to fp32, and no tiled VAE node needed at high resolutions. Your existing VAE file works after updating; don't use bf16 FLUX.2 VAE files
General tips
- Gated Hugging Face models: click 'Agree and access' on each model page, or you'll get 403 errors
- Steps scale with dataset size (steps = epochs x images at batch 1)
- A safe start: LoKr with auto rank (~64), batch/grad accumulation 4
- Leave out of your captions whatever you want burned into the LoRA; caption what should stay changeable
- ai-toolkit dataset folder weights let you train the same images with long, medium and short captions in separate folders
- ai-toolkit supports validation loss, which shows when a run stops improving
- In ai-toolkit, Cache text embeddings works for basically every model and frees the text encoder from VRAM and RAM
- Prefer int8 convrot over qfloat8 quantization in ai-toolkit: better quality at the same memory
- Gradient accumulation and batch size don't scale the learning rate in ai-toolkit; a bigger batch needs about 1.5-2.5x the steps
Compare with other trainers
Where to rent a 24 GB+ GPU
Cheapest 24 GB+ cards (2026-10-20 08:06 UTC) from RunPod and Vast.ai. Prices move constantly; see the live price table.
| GPU | VRAM | RunPod community $/hr | Vast.ai cheapest $/hr |
|---|
| RTX 3090 | 24 GB | $0.22 | $0.12 |
| Tesla V100S | 32 GB | — | $0.14 |
| RTX A5000 | 24 GB | $0.16 | — |
| RTX PRO 4000 | 24 GB | $0.50 | $0.26 |
| RTX 3090 Ti | 24 GB | $0.27 | — |
| RTX A6000 | 48 GB | $0.33 | $0.40 |
Sources
FAQ
Does ai-toolkit support FLUX.2 dev?
Yes: supported (reference) (see sources below).
How much VRAM do I need for a FLUX.2 dev LoRA?
80 GB recommended; ai-toolkit ships train_lora_flux_24gb.yaml
Weekly newsletter: new models, trainer releases, cheapest GPUs.
Subscribe
Data updated 2026-10-20. Disclosure: RunPod and Vast.ai links are referral links; ImageLoRA may earn a commission at no cost to you. unknown = no data yet. · Raw data (JSON) · llms.txt