LocalForge AILocalForge AI
LibraryBlogFAQ

How to Use Synthetic Data for LoRA Training

Synthetic images can fill a specific gap in a LoRA dataset, but they are not a free substitute for real evidence. A generator can create a missing side view, lighting condition, background, or garment variation quickly. It can also repeat its own facial proportions, anatomy errors, composition habits, signatures, and prompt associations across the entire set. If those outputs come from the same model that will later use the LoRA, the adapter may reinforce what the base already believes instead of learning the target you intended.

This guide is a controlled augmentation workflow, not a general dataset-building guide. It covers how to write a generation plan, preserve provenance, mix real and synthetic examples, filter defects, detect leakage, audit bias, remove exact and semantic duplicates, and validate whether synthetic additions improve the adapter. The goal is not to maximize image count. The goal is to add new, trustworthy evidence while keeping every generated image traceable and reversible.

Quick Answer

Use synthetic images only to cover named gaps that real, licensed, or consented images do not cover well. Keep the real set intact, generate into a separate staging area, record the generator and prompt for every output, reject defects, deduplicate against both real and synthetic images, then compare three controlled runs:

  1. real data only;
  2. real data plus a conservative synthetic supplement;
  3. synthetic data only, as a diagnostic rather than the default release candidate.

Keep the base checkpoint, captions, trainer settings, exposure, validation prompts, and seeds fixed. Synthetic data has earned a place only if the mixed run improves the missing capability without worsening identity, prompt control, diversity, or output artifacts.

Start With a Gap, Not a Generation Prompt

First freeze the real dataset and write an inventory. Count useful examples by the dimensions that matter to the LoRA:

  • viewpoint and camera angle;
  • close, medium, and wide framing;
  • pose or articulation;
  • expression;
  • lighting;
  • background;
  • clothing or material;
  • aspect ratio;
  • concept-specific edge cases.

Then name the shortage precisely. "Need more variety" is not actionable. "The object has no rear view and only one outdoor example" is.

Give each proposed synthetic image a job. If an output does not fill a row in the coverage plan, do not add it merely because it looks polished. This constraint prevents generation volume from becoming accidental training weight.

Synthetic augmentation is poorly suited to facts the generator cannot know. It cannot recover an unseen tattoo, the hidden back of a one-off garment, exact product geometry, or a person's real profile from one frontal image. In those cases it creates a plausible guess. Label that guess as synthetic and do not treat it as identity evidence.

Choose the Generation Strategy

There are three useful patterns.

Text-only generation

Generate from a prompt when the target is a general style, composition, pose, lighting condition, or class-level variation. This gives strong diversity but weak fidelity to a unique subject.

Reference-conditioned generation

Use an authorized reference with an image adapter, pose control, depth control, or another conditioning method when identity or geometry matters. Reference conditioning can preserve more target detail, but it can also copy the source composition and produce many near-duplicates.

Controlled editing

Edit a real image to change one incidental factor such as background, crop, expression, or color. This is useful for counterexamples, but preserve the original and inspect seams, lighting mismatch, hands, reflections, and changed identity features.

Do not use a LoRA to generate most of the data for its own next training cycle without a separate source of truth. Self-consuming training loops can narrow a distribution and amplify errors over repeated generations. Research on model collapse and self-consuming generative loops does not provide a universal safe percentage for image LoRAs, but it supports a conservative rule: retain original data, verify generated examples, and measure each augmentation cycle independently.

Create a Generation Manifest

Store generated candidates outside the final training directory. Give every output a stable identifier and record:

  • output filename and cryptographic hash;
  • generation date;
  • generator name, exact checkpoint, revision, and file hash;
  • VAE, text encoder, and pipeline version when relevant;
  • prompt and negative prompt;
  • seed;
  • sampler, scheduler, steps, guidance, and resolution;
  • all adapters, embeddings, and controls with strengths;
  • source image identifiers and permission basis;
  • intended coverage gap;
  • review status and rejection reason;
  • final caption;
  • whether metadata was retained or stored in a sidecar.

Embedded PNG or safetensors metadata is convenient, but it is not enough. Platforms can strip it, fields can be incomplete, and filenames can change. Keep a CSV or JSON Lines manifest under version control with the dataset revision.

C2PA specifications provide a primary standard for content provenance and signed assertions. A C2PA credential can strengthen a chain of custody when supported, but absence of a credential does not prove an image is real, and presence does not prove that an image is suitable for training. Keep your own manifest either way.

Generate for Coverage, Not Quantity

Build a prompt matrix from the gap inventory. Change one or two major variables per batch so failures remain attributable. For example:

  • front, three-quarter, side, and rear view;
  • neutral, warm, and cool lighting;
  • indoor, outdoor, and plain backgrounds;
  • close, medium, and full framing;
  • standing, seated, and moving poses.

Use several seeds for each cell, then select only one or two materially different results. A folder of 200 outputs from a narrow prompt is not 200 independent examples.

If the target is a style, diversify subjects and layouts aggressively. If the target is a person or object, do not allow synthetic guesses to outvote verified identity or geometry. If the target is clothing, inspect construction details such as closures, seams, trim, and rear panels rather than accepting a visually similar garment.

Avoid generating the training set and the validation set with the same prompt template. That creates evaluation leakage: the test rewards the generator's recurring composition and language rather than the adapter's generalization.

Filter in Multiple Passes

A single aesthetic score is not a quality review. Use separate gates.

Gate 1: technical integrity

Reject unreadable files, unintended alpha channels, severe compression, broken color profiles, accidental borders, watermarks, signatures, and corrupted metadata.

Gate 2: visual correctness

Inspect anatomy, eyes, teeth, fingers, limbs, object geometry, text, reflections, shadows, repeated textures, and edge transitions. Zoom in. A defect that seems minor in a contact sheet may become a repeated LoRA feature.

Gate 3: target fidelity

Compare against authorized real references. Reject changed facial structure, missing marks, invented accessories, wrong materials, inconsistent proportions, and guessed details presented as fact.

Gate 4: marginal value

Ask whether the image adds coverage after better candidates are selected. A flawless duplicate still adds little.

Gate 5: rights and policy

Confirm that source images, generator terms, checkpoint license, and planned distribution permit the use. Do not synthesize a real person's identity without consent or create deceptive or non-consensual material.

Keep rejection reasons. They reveal recurring generator failures and prevent rejected outputs from returning in a later batch.

Detect Leakage and Contamination

Leakage has several forms in a LoRA workflow.

Reference leakage occurs when an output copies the source crop, background, or texture so closely that it is effectively an augmented duplicate.

Base-model leakage occurs when the generator already contains the character, artist, product, or benchmark concept. The synthetic image may reproduce memorized model knowledge rather than your authorized references.

Validation leakage occurs when training images are selected with the same seeds, prompt templates, reference images, or target outputs used for evaluation.

Adapter leakage occurs when an existing LoRA for the target helps generate examples for a new LoRA, but that dependency is omitted from provenance.

Search the generator's model card and known training scope. Run the prompt without target references or adapters. If the base already produces the identity or signature style, document that fact and reconsider whether synthetic outputs provide independent evidence.

Keep validation references, prompts, and seeds out of the generation selection loop. Do not choose training images because they resemble the expected validation answer.

Audit Bias Before Mixing

Generators have defaults. A prompt for a person may repeatedly produce the same age range, body shape, skin treatment, camera angle, expression, or beauty standard. An illustration model may default to one face, palette, line weight, or composition.

Count selected synthetic images by the dimensions in your coverage plan. Compare those counts with the real set. Look for:

  • one frontal three-quarter face dominating;
  • one body type or skin tone replacing real variation;
  • sexualized poses appearing without request;
  • all backgrounds sharing the same blur or lighting;
  • repeated high-angle or centered compositions;
  • one rendering artifact across many outputs;
  • captions that describe synthetic stereotypes as target traits.

Correct bias by changing the generation matrix, not by accepting more random outputs. If the generator cannot produce a trustworthy subgroup, keep that gap explicit rather than filling it with poor evidence.

Deduplicate at Three Levels

First remove exact byte duplicates with hashes. Next use perceptual hashes to find resized, recompressed, cropped, or lightly edited copies. Finally use image embeddings to cluster semantically similar outputs that differ in pixels but repeat the same pose and composition.

Review candidate pairs manually. Perceptual and embedding thresholds are dataset-specific. A strict threshold can remove legitimate identity views, while a loose threshold can miss repeated generations.

Deduplicate:

  • synthetic against synthetic;
  • synthetic against real;
  • training against held-out validation references;
  • current revision against earlier generated batches.

Keep one representative from each near-duplicate group. Record which files were removed and why. Do not use filenames or seeds as a proxy for visual independence.

Mix Real and Synthetic Data Conservatively

There is no evidence-based universal ratio for LoRA datasets. A safe starting policy is determined by evidence quality, not a popular percentage.

Keep the real set as the anchor. Add the smallest synthetic subset that fills named gaps. For a 30-image real set missing two viewpoints, four carefully verified additions may be more useful than 30 generated portraits. For a fictional style with no identity constraints, a larger synthetic share may be reasonable, but diversity and provenance still matter.

Control effective exposure, not just file count. Ten synthetic images repeated five times can dominate 30 real images repeated once. Calculate:

effective examples = images x repeats x epochs

Separate real and synthetic subsets in the trainer configuration so their sampling weights are visible. Avoid hidden oversampling through duplicate folders or copied captions.

Run a ratio ladder only when needed, such as real-only, low synthetic, and medium synthetic. Stop increasing the synthetic share when the measured benefit plateaus or a regression appears.

Caption Synthetic Images Honestly

Captions must describe visible content, not the intended prompt. Remove prompt terms that failed to appear. Add visible artifacts or incidental features when they should remain controllable.

Do not add "synthetic" as a conditioning token unless you deliberately want that concept learned. Track synthetic origin in the manifest, not necessarily in the text caption.

For reference-conditioned outputs, verify that identity traits are actually present. For edited images, caption the final pixels rather than the source. Normalize synonyms across real and synthetic subsets so origin does not become predictable from writing style alone.

An automatic captioner can draft text, but its errors may correlate with the same model family that produced the images. Review every accepted caption beside the image.

Validate With an Ablation, Not a Beauty Contest

Train at least the real-only and mixed variants with the same base, trainer version, rank, optimizer, learning rate, batch behavior, total exposure, and checkpoint schedule. If total examples change, normalize comparisons by steps or effective exposure and state the choice.

Use a fixed validation grid that tests:

  • the exact gap synthetic data was meant to fill;
  • identity or concept fidelity;
  • unseen poses and backgrounds;
  • prompt control over variable attributes;
  • multiple LoRA strengths;
  • prompts without the trigger;
  • artifact frequency;
  • diversity across several seeds.

Include blind pair review where practical. Randomize labels so reviewers do not know which run used synthetic data. Score each criterion separately instead of asking which image looks best.

The mixed run passes only if it improves the target gap without a meaningful regression elsewhere. If a synthetic-only run looks polished but loses identity, diversity, or control, it has diagnosed generator prior, not proven dataset quality.

Release Checklist

Before training or distribution, confirm:

  1. every synthetic file has a manifest record;
  2. each accepted image fills a documented gap;
  3. source rights and model licenses were checked;
  4. exact, perceptual, and semantic duplicates were reviewed;
  5. synthetic files were compared against real and validation sets;
  6. visual defects and identity guesses were rejected;
  7. bias counts were reviewed;
  8. captions describe final visible content;
  9. real and synthetic sampling weights are explicit;
  10. real-only and mixed runs use a controlled validation grid;
  11. rejected files cannot silently return;
  12. the final model card discloses synthetic-data use and limitations.

Bottom Line

Synthetic data is useful when it has a narrow assignment, a verifiable history, and a measurable benefit. Generate to fill coverage gaps, then filter harder than you would filter real photographs because generated defects are systematic and easy to repeat.

Keep real data as an anchor, deduplicate across every split, isolate validation, and select the final adapter through a real-only versus mixed ablation. If the synthetic supplement cannot beat that test, more generated images are not the fix.

What to Do Next

FAQ

What percentage of a LoRA dataset should be synthetic? +
There is no universal safe percentage. Start with the smallest verified synthetic subset that fills a named coverage gap, keep real data as the anchor, control repeats, and compare a mixed run against a real-only baseline.
Can I train a LoRA using only AI-generated images? +
You can, especially for fictional styles or concepts, but the adapter may amplify the generator's anatomy, composition, and aesthetic biases. Treat a synthetic-only run as a separate experiment and validate diversity, control, and artifacts.
How do I prevent synthetic training images from leaking into validation? +
Use separate references, prompts, and seeds; deduplicate training against validation with hashes and embeddings; and avoid selecting training outputs because they resemble the expected validation result.
Should captions say that an image is synthetic? +
Track origin in a manifest. Add a synthetic token to captions only if you intentionally want that token to condition the model, because otherwise the LoRA may learn it as part of the visual concept.
How should I deduplicate generated LoRA images? +
Combine cryptographic hashes for exact copies, perceptual hashes for edited copies, image embeddings for semantic similarity, and manual review. Compare synthetic images against real images and held-out validation references too.
How do I know whether synthetic data improved my LoRA? +
Train real-only and mixed variants under matched conditions. Compare fixed prompts, seeds, checkpoints, and LoRA strengths on the target gap, identity, prompt control, diversity, and artifact rate.