LoRA training
LoRA training datasets: images, captions, angles, and what to delete
The expensive part of LoRA training is not the GPU. It is discovering, 1,200 steps later, that half the dataset was the same selfie, every image had beauty smoothing, and the only full-body frame was anatomically broken. A good dataset is small enough to inspect by hand and varied enough that identity is the only thing the images consistently share.
Based on official documentation, public benchmarks where relevant, and corroborated practitioner reports where useful. No placement in these guides is paid.
The short answer
What I would pick
Start with 15–40 licensed, high-quality images; for most first character LoRAs, 20–30 is a sensible working set. Cover close, medium, and full-body framing, front/three-quarter/profile angles, expressions, outfits, backgrounds, and light. Caption the attributes you want to change later. Keep a few useful conditions outside training, and delete weak images even when that makes the folder smaller.
If the set only works because you repeated mediocre images ten times, the dataset is not ready.
On this page
Skip to the part you need
- Define what the LoRA should learn
- How many images you actually need
- Build a useful character shot list
- What to delete before training
- Caption identity without baking in everything else
- Crop, resolution, and aspect buckets
- Keep a real validation set
- Folder layout and dataset audit
- Using synthetic images without compounding artifacts
- Consent, licensing, and the final checklist
Define what the LoRA should learn
Write one sentence before collecting anything: “This LoRA should reproduce this identity across new clothes, locations, lighting, expressions, and camera distances.” That sentence is a filter. An image belongs only if it helps the model learn the identity or proves that identity can survive a useful variation.
A character LoRA and a style LoRA need opposite kinds of consistency. For a character, keep identity stable and vary treatment. For a style, vary subjects and composition while keeping the visual treatment stable. A product LoRA sits between them: shape, proportions, materials, and logos may need to stay fixed while angle and scene change.
| LoRA target | Keep consistent | Deliberately vary |
|---|---|---|
| Character | Identity and stable physical features | Clothes, pose, crop, expression, background, lighting |
| Style | Palette, rendering, texture, line or photographic treatment | People, objects, scenes, composition, aspect ratio |
| Product | Shape, materials, proportions, identifying details | View, context, light, supporting objects, scale cues |
This guide is character-first. Its examples refer only to fictional characters or consenting adults. The same culling and caption logic generalizes to products and styles, but do not copy the shot distribution blindly.
How many images you actually need
There is no magic count. LoRA capacity, base model, training resolution, captions, repetition, subject complexity, and intended range all change the answer. The useful number is the smallest set that covers the subject without making unrelated attributes look like identity.
| Dataset size | When it can work | Main risk |
|---|---|---|
| 8–14 images | Distinctive character, narrow framing, clean originals | Fragile angles and strong leakage from clothes or backgrounds |
| 15–25 images | Focused portrait identity with deliberate variety | A missing side, expression, or full-body condition can remain obvious |
| 26–40 images | Broader pose, wardrobe, light, and framing coverage | Quality quietly drops because “more” feels productive |
| 40+ images | Complex subject or carefully curated multi-look project | Duplicates dominate and training exposure becomes harder to reason about |
Start around twenty images and inventory what is missing. Add a new file because it gives you a clean profile, a different crop, a useful expression, or an unseen lighting condition—not because a forum said forty is safe. Perceptual variety matters more than filename count.
Repeats do not create information. Ten repetitions of a near-duplicate close-up tell the optimizer that this view matters ten times more. Use repeats and epochs to control exposure after the dataset is balanced, not to disguise a thin set.
Build a useful character shot list
A dataset should look slightly boring as a gallery and excellent as evidence. You do not need twenty hero shots. You need clean observations of the same identity under conditions the finished LoRA must survive.
| Coverage | Practical share of a 24-image set | What it teaches |
|---|---|---|
| Close portraits | 4–5 images | Eyes, nose, mouth, hairline, skin, and stable facial proportions |
| Head-and-torso / medium | 6–7 images | Face-to-body relationship, shoulders, hair, gesture, clothing separation |
| Three-quarter / full body | 5–6 images | Body proportions, posture, limbs, and identity at smaller face scale |
| Clear side and three-quarter angles | 3–4 images across the set | Profile, jaw, nose projection, ear and hair volume |
| Expression and difficult light | 4–6 images across the set | Identity beyond one neutral, flattering studio pose |
Categories can overlap: a medium three-quarter view under window light can fill several gaps. Across the whole set, include front, three-quarter, and side views; neutral and expressive faces; indoor and outdoor context; soft and harder light; and several outfits.
Change hairstyles carefully. If hair is core to the fictional design, keep its shape mostly stable and vary styling modestly. If users must prompt different hair later, show that variation and caption it. The model cannot infer your character bible from the filename.
What to delete before training
Culling is where the dataset becomes useful. View every image at 100%, then as a contact sheet. A file can be individually beautiful and still harmful because it repeats a pose, introduces a false facial feature, or teaches the same background for the fifteenth time.
Delete or replace images with:
- Incorrect hands, teeth, pupils, ears, limbs, clothing seams, or body geometry.
- Beauty filters, waxy skin, aggressive sharpening, face restoration, or smeared detail.
- Watermarks, captions, UI, logos you do not intend to teach, or heavy compression blocks.
- Motion blur that obscures identity rather than providing a useful photographic variation.
- Occlusion covering the exact feature the image is meant to teach.
- A different apparent age, facial structure, or body proportion caused by generation drift.
- Near-duplicates, including alternate crops or minor color grades of the same source.
- A dominant accessory, outfit, room, or camera treatment already overrepresented.
Use duplicate-detection software as a first pass, not an editor. Perceptual hashes can find resized copies; they cannot tell you that six different images have effectively the same front-facing pose and flat window light.
Never keep a bad full-body image because “the model needs full body.” It teaches the bad anatomy too. A missing condition is visible and fixable. A corrupted condition can look like a mysterious training problem for days.
Caption identity without baking in everything else
Use a rare trigger token such as rfgmara and include it consistently. Then describe attributes that should remain promptable: framing, pose, expression, clothing, hairstyle, accessories, lighting, background, and photographic treatment.
photo of rfgmara, adult woman, three-quarter view, medium shot,
calm expression, hair tied back, green knit sweater,
soft window light, plain kitchen backgroundThe caption deliberately names the sweater, tied hair, light, and room. If those appear in several images but go unnamed, the optimizer may attach them to the trigger. It does not need a forensic list of stable facial measurements. Those are what the identity token is supposed to learn.
| Caption this | Why | Common mistake |
|---|---|---|
| Crop and angle | Keeps close-up, profile, and full-body views controllable | Calling every image simply “portrait” |
| Outfit and accessory | Separates wardrobe from identity | Omitting a jacket that appears in half the set |
| Hair variation | Explains ponytail, loose hair, hat, or wet hair | Accidentally teaching one styling choice as anatomy |
| Light and treatment | Separates flash, studio polish, grain, and color cast | Baking direct flash or smooth retouching into every output |
| Background | Lets the prompt move the character somewhere new | Ignoring a repeated bedroom, car, or seamless backdrop |
An automatic captioner is an assistant, not an authority. Correct hallucinated age, hair color, emotion, clothing, and camera terms. Keep wording consistent enough that equivalent concepts do not fragment into five synonyms, but do not add a boilerplate paragraph to every file.
Crop, resolution, and aspect buckets
Do not stretch every image into a square. Aspect bucketing groups similar shapes so the trainer can resize and batch them with less destructive cropping. Use the bucket system documented by your exact trainer and model, with a pixel area appropriate to the base. For modern 1024-class image models, buckets centered around that training scale are a sensible starting point when hardware allows.
Crop out empty space only when it contributes nothing. Do not cut through hair, chin, fingers, elbows, knees, or feet to force a ratio. Those crops teach the model that bodies end where your preprocessing got impatient.
Upscaling a tiny, compressed source does not recover identity detail. It creates new pixels from an upscaler’s prior and may add synthetic pores, eyelashes, or sharpening that every training image then repeats. Prefer a clean source at sufficient resolution. If one irreplaceable image needs restoration, compare it carefully to the subject and record the intervention.
Extremely wide or tall images can create inefficient buckets and tiny subject scale. Keep them only when that composition is part of the intended output range. Otherwise use a respectful crop that preserves anatomy and the relevant environment.
Keep a real validation set
A training preview is not validation if it recreates a training caption and seed. Write validation prompts before training and do not edit them to flatter each checkpoint. They should cover conditions the dataset implies the LoRA can generalize to.
A compact character validation grid includes:
- A neutral close portrait in unseen lighting.
- A side or strong three-quarter view with a new expression.
- A medium shot in clothing absent from the dataset.
- A full-body scene in an unseen location.
- A difficult but realistic camera treatment such as direct flash or backlight.
- A prompt without the trigger, confirming the base model still behaves normally.
Keep seeds, dimensions, guidance, sampler, and base model fixed. Render the same grid for several checkpoints and adapter strengths. Score identity, prompt obedience, anatomy, scene leakage, texture, and diversity separately.
If you have enough authorized material, keep two or three good source images fully outside training as visual references. Do not use face-similarity software as the only judge; it can reward a copied frontal arrangement and miss whether the LoRA works as a generative tool.
Folder layout and dataset audit
AI Toolkit commonly works with an image and a same-name caption sidecar. Other trainers may use concept folders, metadata JSONL, repeat counts in directory names, or a separate dataset configuration. Choose one convention from the current tool documentation and make the loader prove it found every caption.
mara-character-v01/
train/
mara_001.jpg
mara_001.txt
mara_002.png
mara_002.txt
validation/
prompts.txt
reference-notes.md
manifests/
dataset.csv
consent-and-license.md
config/
klein4b-r16-v01.yamlThe manifest should record filename, source or creator, permission/license, subject age confirmation where relevant, crop or restoration notes, caption status, and a short reason the image remains in the set. Hashes help detect silent replacement without forcing you to publish private originals.
Run this audit before renting a GPU:
- Every image opens, has the expected color orientation, and is assigned one caption.
- The trigger is spelled identically in all intended captions.
- No train image accidentally lives in validation or vice versa.
- Angles, crops, clothes, backgrounds, and lighting have been counted, not guessed.
- Near-duplicates and alternate exports have been removed.
- The loader preview shows the crop and caption the trainer will really see.
Using synthetic images without compounding artifacts
Synthetic images are useful when the character itself is fictional, when you own the generation rights, or when a licensed source set lacks a specific angle. They are also dangerous because a generator’s mistake can become the LoRA’s stable anatomy.
Inspect synthetic sources more aggressively than photographs. Look for repeated pore patterns, symmetrical flyaway hair, fused jewelry, drifting eye color, inconsistent ears, extra teeth, impossible cloth, and identity changes hidden by the same makeup or lighting. Zoom out too: a face can look consistent while head size and body proportions drift.
Avoid generating the entire dataset with one seed neighborhood, prompt template, camera angle, and model. That teaches the teacher model’s local groove. Vary seeds and conditioning deliberately, then cull back to one coherent identity. Using multiple source models can add diversity, but only if the character stays stable; variety is not useful when it becomes several people sharing a hairstyle.
Do not repeatedly train, generate, and feed those outputs back without a human-controlled reference. Each cycle can amplify smooth skin, anatomy shortcuts, and compositional bias. Keep a character sheet or authorized photographic reference outside the loop and compare every new batch against it.
Consent, licensing, and the final checklist
Use fictional characters you control or consenting adults who understand that their identity will be used to train a generative adapter. Consent should cover the intended audience, commercial use, sensitive categories, redistribution of the LoRA, and whether consent can be withdrawn. A model made from an adult’s photos can still create uses they never agreed to.
Image copyright, model license, and personality/privacy rights are separate questions. A Creative Commons license may require attribution, prohibit commercial use, require share-alike terms, or disallow adaptations; it does not automatically grant permission to model a recognizable person. “Publicly visible” is not a license.
Do not train identity LoRAs from:
- Minors or anyone whose age is uncertain.
- Private people, former partners, clients, or coworkers without explicit agreement.
- Leaked, hacked, hidden-camera, intimate, or otherwise non-consensual material.
- Scraped social profiles, face-search results, or stock previews with unclear rights.
- Public figures for impersonation, deception, sexual content, or false endorsement.
The final green light is simple: every file is technically sound, adds distinct coverage, has an accurate caption, has documented rights, and fits the one-sentence target. The set has holdouts, the training loader preview has been inspected, and the validation grid is written before training begins.
If an image makes you say “it is not great, but maybe the model can use it,” delete it. Trainers are very good at learning the part you hoped they would ignore.
Research notes
Primary sources and further reading
Model names, licenses, limits, and prices move quickly. These are the sources used for the dated market check above; confirm live pricing and terms before spending money.
- Diffusers: DreamBooth trainingOfficial overview of subject-driven fine-tuning, prior preservation, and training behavior.
- Diffusers: LoRA trainingOfficial LoRA training concepts and the parameters exposed by Diffusers examples.
- AI ToolkitDataset-folder conventions, caption sidecars, configuration examples, and supported trainers.
- OneTrainerOpen-source training toolkit with dataset concepts, aspect bucketing, masking, and sampling.
- kohya-ss training documentationReference documentation for repeats, buckets, captions, regularization, and common dataset controls.
- Hugging Face: image dataset structureA reproducible image-and-metadata layout for datasets that need more than caption sidecars.
- Creative Commons license conditionsPlain-language explanation of attribution, commercial-use, adaptation, and share-alike conditions.
