· August 24, 2026
A base model can draw anything in general and nothing in particular. If you want your character, your product, or your art style to appear on demand, you train a LoRA — a small adapter that teaches FLUX.1 a specific concept without retraining the whole 12B model. The community-standard tool for this is AI-Toolkit by Ostris, and it has made FLUX LoRA training approachable enough to do on a single 24 GB GPU (and, with offloading, less).
This is a developer-focused walkthrough: dataset, config, training, and using the result in ComfyUI.
What a LoRA Actually Learns
A LoRA (Low-Rank Adaptation) freezes the base model and injects small trainable matrices into its attention layers. You train only those — a few dozen megabytes instead of gigabytes — so training is fast and the output file is portable. For FLUX, a good LoRA can capture a character's identity, a product's exact design, or a consistent illustration style that you can then invoke with a trigger word.
Step 1: Build the Dataset
This is where 80% of your final quality is decided. Models are only as good as the images you show them.
Count: 15–30 high-quality images is plenty for a character or style. More is not automatically better; variety is.
Variety: vary pose, angle, lighting, and background so the model learns the subject, not the setting. For a face, include close-ups and mid-shots.
Resolution: 1024px or larger. AI-Toolkit handles bucketing across aspect ratios; you do not need to crop everything square.
Captions: create a matching .txt next to each image. For FLUX, natural-language captions work well: "a photo of tk_mascot robot standing in a park, sunny day." Put your trigger word (something rare like tk_mascot) in every caption.
Consistency for characters: if identity matters, keep the subject unmistakably the same across every image.
Step 2: Install AI-Toolkit
Clone the repo and install its Python requirements (a virtual environment is strongly recommended).
Provide your FLUX.1 [dev] base weights — AI-Toolkit can pull from Hugging Face if you accept the model license and set a token.
Copy the FLUX training example config from config/examples/ to your own working file.
Step 3: Configure the Training Run
The config file (YAML) is the control panel. The settings that matter most:
trigger_word — the token that will summon your concept. Match your captions.
network.linear / linear_alpha (rank) — LoRA rank. 16 is a solid default for characters and styles; higher ranks capture more but risk overfitting and bloat the file.
steps — 1500–3000 is typical. Start around 2000.
lr (learning rate) — 1e-4 is the common FLUX starting point.
resolution — include [768, 1024] so it learns across scales.
Sampling — set the trainer to emit sample images every few hundred steps so you can watch it learn.
Reading the Samples
The sample images are your telemetry. Around step 500 the concept should start appearing; by 1500–2000 it should be solid. If samples look like a photocopy of your training images (same pose, same background every time), you are overfitting — reduce steps or rank. If the concept never sharpens, train longer or check that your captions actually name it.
Step 4: Use the LoRA in ComfyUI
Copy the trained .safetensors into ComfyUI/models/loras/.
In a standard FLUX workflow, add a LoraLoader between the model loader and the sampler.
Put your trigger word in the prompt.
Set strength_model to 1.0 and tune from there: 0.7–0.9 if the LoRA overpowers the scene, up toward 1.1 if the concept is too weak.
Optimization and Troubleshooting
VRAM: FLUX LoRA training fits on 24 GB cleanly. On 16 GB, enable the low-VRAM/offload options in the config (they trade speed for fit). AI-Toolkit's defaults already lean memory-efficient.
Overfitting is the most common failure: reduce steps, lower rank, or add dataset variety.
"It ignores my trigger word": your captions probably did not include it consistently, or another common word is doing the work — pick a genuinely rare trigger.
Style bleed: if a style LoRA recolors everything, lower its strength or caption the style explicitly so the model isolates it.
Publish: export to Civitai with sample images and your recommended strength so others (and future-you) can reproduce results.
Conclusion
Training a FLUX LoRA is less about compute and more about curation and observation: a tight, varied dataset with honest captions, a sane config, and attention to the sample images as they evolve. Nail the dataset, keep rank modest, watch for overfitting, and you will have a reusable adapter that drops your exact concept into any FLUX workflow — the foundation of a consistent, branded content pipeline.
Downloadable Workflow & References
|

0 Comments