OneTrainer LoRA Training Guide: A Repeatable First Run
OneTrainer is a strong LoRA trainer when you want one application for dataset preparation, configuration, sampling, backups, and model export. Its official project currently supports GUI and CLI operation, full fine-tuning, LoRA, embeddings, aspect-ratio bucketing, multi-resolution training, masked training, automatic captions, image augmentation, TensorBoard, and samples during training. It also lists model families including Stable Diffusion 1.5, SDXL, SD3/3.5, FLUX.1, and Flux.2 variants.
That feature list doesn't remove the hard part. A preset can start a run, but it can't decide whether your images are coherent, your captions separate the trigger from changeable traits, or your final checkpoint works outside the training UI. This guide treats OneTrainer as an experiment system: isolate each project in a workspace, start from the correct model preset, make a short smoke test, save regular backups and samples, then compare exported checkpoints under fixed inference settings. OneTrainer is its own project; this page does not describe it as a Kohya fork.
Key Takeaway
OneTrainer is the better first choice when you value an integrated workflow over maximum exposure to sd-scripts controls. Its concepts, workspaces, automatic backups, caption and mask tools, sampling UI, and TensorBoard support keep the project in one place.
Start from the preset matching your architecture, but don't trust it blindly. Verify the base model, prompt source, output format, resolution, trained components, and total steps before clicking Train. OfflineCreator's planned LoRA Studio workflow aims to add more project guidance; LocalForge AI remains a separate image-generation product. Kohya_ss is the better current fit when you need its specific parameters or established sd-scripts recipes.
For the surrounding workflow, use the LoRA Studio workflow overview, then continue with LoRA training dataset guide when that decision becomes relevant.
What OneTrainer Actually Includes
The official repository describes OneTrainer as a one-stop diffusion training application. It supports a graphical interface and command-line scripts, and its current README lists a broad set of model families and training tools.
Useful LoRA features include:
- Concept-based datasets: Each concept can point to images, choose a prompt source, include subdirectories, and define augmentation behavior.
- Caption and mask tools: The repository lists BLIP, BLIP2, and WD-1.4 captioning plus ClipSeg and Rembg mask creation.
- Bucketing and multiple resolutions: Images with different aspect ratios can be grouped near a target pixel count rather than forced into one shape.
- Workspaces: Run-specific backups, samples, and TensorBoard data live together.
- Automatic backups: OneTrainer can preserve enough training state to continue a run. Its quick start warns that backups aren't inference files; use model saves or conversion output for inference.
- Sampling during training: Fixed prompts reveal visual progress without switching applications.
- GUI and CLI: The scripts directory includes training, captioning, masks, model conversion, sampling, and loss calculation tools.
OneTrainer isn't presented by its maintainers as a fork of Kohya_ss. It is an independent training application with its own workflow, codebase, and AGPL-3.0 license.
Hardware, Models, and Storage
VRAM needs vary too much for one honest minimum. Architecture, resolution, batch size, precision, optimizer, caching, trained components, and model weight format all change the requirement.
- SD 1.5: Use it for the lowest-friction learning run and faster iteration.
- SDXL: Train around the model's native 1024-pixel class and enable bucketing for mixed aspect ratios. Reduce memory pressure with documented settings rather than silently training at an unsuitable resolution.
- Flux: The official OneTrainer Flux wiki calls the model large and slow, recommends LoRA rather than a full fine-tune for ordinary use, and documents model-specific precision and access details. Recheck that page because it is explicitly a work in progress.
- Storage: Plan for the base model, Python environment, caches, workspace backups, TensorBoard logs, samples, and exported saves. Backups can be much larger than a final LoRA.
NVIDIA CUDA is the easiest supported route for most Windows users. If you use a less common platform, check current issues and installation notes before planning a long run.
Step 1 — Install OneTrainer from the Official Repository
The current README requires Python 3.10 or newer and below 3.14. Clone Nerogar/OneTrainer, then use install.bat on Windows or install.sh on Linux and macOS. Manual virtual-environment installation is also documented.
Start the GUI with start-ui.bat on Windows or start-ui.sh on Unix-like systems. Confirm the application opens and sees the expected GPU before downloading or indexing a large dataset.
Record the commit or release used for a successful project. Update between experiments, not halfway through one. If a reproducible problem remains after updating, the project asks for an exported debug report with issue submissions.
Step 2 — Create a Clean Workspace
Give every training experiment an empty workspace directory. OneTrainer uses it for backup, sample, and TensorBoard data, which makes the workspace your run history.
Use a predictable structure:
- Source: Original images that never change during the experiment.
- Training set: Cleaned images and matching captions.
- Workspace: OneTrainer's run state, samples, and backups.
- Exports: Final inference-ready LoRA files and configs.
- Evaluation: Fixed prompts, seeds, contact sheets, and notes.
Don't point two active experiments at the same workspace. Mixed samples and backups make it hard to prove which settings produced a checkpoint.
Step 3 — Prepare and Caption the Dataset
Remove duplicates, blurred failures, irrelevant images, watermarks, and contradictory examples. Keep the concept consistent while preserving useful variation in pose, framing, background, lighting, and composition.
OneTrainer's quick start supports prompts from same-name .txt files, image filenames, or a separate text file selected in the concept. Same-name caption files are the easiest format to inspect and move between tools.
Automatic captioning is a draft, not a final authority. Review every caption, normalize spelling, remove hallucinated details, and decide which permanent concept traits belong behind the trigger token. The dedicated dataset and captioning guide gives a complete cleanup process.
Keep a few images outside training. Validation images won't calculate magic quality scores, but they help you test whether the learned concept generalizes beyond repeated training compositions.
Step 4 — Select a Preset and Input Model
Choose the preset matching both the architecture and training method. Then select the exact base model and identify its model type correctly.
The quick start says OneTrainer accepts:
- Checkpoint files:
.ckptor.safetensorswhere supported. - Diffusers directories: A local model folder in Diffusers format.
- Hugging Face identifiers: A repository name when access and connectivity allow it.
- OneTrainer backups: For continuing training, not as inference files.
Save the base model's source, license, filename, and hash. A LoRA trained on SDXL won't become a Flux LoRA by changing the output filename.
Step 5 — Add and Inspect the Concept
Create a concept configuration, add the concept, and point it at the training directory. Select the actual prompt source. If captions are beside images, verify OneTrainer resolves several random pairs before training.
Enable aspect-ratio bucketing when the set contains varied shapes. OneTrainer's documentation says images are resized to roughly the same target pixel count within generated buckets.
Use augmentation only when it preserves meaning. Horizontal flips are wrong for readable text, one-sided details, and directional designs. Color or brightness changes can also weaken a color-specific style or identity.
If latent caching is enabled, remember that data-setting changes can make an old cache invalid. The quick start says to clear the cache or use a new cache directory when related settings change.
Step 6 — Set Training and LoRA Controls
Confirm epochs, batch size, gradient accumulation, learning rate, scheduler, precision, resolution, trained components, rank, alpha, and dropout. Don't edit every field because a forum screenshot did.
- Batch size: Larger batches require more VRAM. Accumulation can approximate a larger effective batch at the cost of time.
- Learning rate: Too high can damage the run; too low may produce little visible learning. Valid ranges depend on optimizer and model.
- Train data type: Mixed precision trades numerical precision for speed and memory. Hardware support matters.
- Rank and alpha: These control adapter capacity and scaling. Higher rank increases capacity, size, and memorization risk.
- Trained components: UNet/transformer and text-encoder choices are architecture-specific. Follow the current preset and model guide.
For SDXL, use the dedicated SDXL guide rather than a Flux or SD 1.5 recipe. For Flux, use OneTrainer's current wiki and our Flux guide; the project's Flux page changes as maintainers learn more.
Step 7 — Configure Samples, Saves, and Backups
Add several fixed sampling prompts before the run:
- Trigger prompt: Shows whether the core concept appears.
- Variation prompt: Changes setting, pose, lighting, or framing.
- Composition prompt: Tests whether the LoRA follows other prompt details.
- No-trigger prompt: Reveals unintended effect when the trigger is absent.
Use fixed seeds, dimensions, sampler settings, and prompt text. Visual comparison becomes meaningless if every checkpoint receives a different random test.
Configure regular model saves and backups. The quick start makes a critical distinction: a backup contains training state for continuation, but it isn't meant to load in Forge, SwarmUI, or another inference UI. Export or save the model in the intended inference format.
Step 8 — Run a Smoke Test
Start with a short run that proves the complete pipeline. Confirm image loading, prompt loading, cache creation, samples, backups, and model saves all work.
Inspect TensorBoard, but don't treat falling loss as visual quality. Open generated samples and check that the trigger changes output in the intended direction.
If the application runs out of memory, lower batch size first, close other GPU applications, and confirm precision and caching settings are supported for the architecture. Don't randomly reduce resolution below the model's useful training range just to force a run.
Step 9 — Train and Compare Checkpoints
Run the baseline without changing its data midstream. Review samples at every save interval and record the first checkpoint where the concept becomes recognizable.
Later isn't always better. Overtraining often appears as repeated poses, baked-in backgrounds, unwanted clothing, harsh texture, color drift, or reduced response to other prompt details.
Compare several checkpoints at multiple LoRA weights. A usable model usually has a controllable range rather than working at one exact weight. Keep the baseline even if a later experiment looks stronger; it is your reference.
Step 10 — Export and Validate in Your Real UI
Save or convert the winning checkpoint into the inference format you need. Load it in your actual application with the exact base model used for training.
Build an evaluation grid with fixed prompts and seeds. Include:
- A close match to the training domain
- A new background and composition
- Different framing or aspect ratio
- A difficult prompt with competing details
- A no-trigger control
Archive the final LoRA, OneTrainer config, concept config, sample prompts, base-model hash, dataset manifest, and notes. State the tested architecture, checkpoint, trigger, recommended weight range, and known failures when sharing.
Common OneTrainer Mistakes
- Reusing a dirty workspace: Old cache, samples, and backups blur the boundary between runs.
- Confusing backups with exports: Training backups are for continuation; model saves are for inference.
- Trusting generated captions: Automatic labels need human cleanup.
- Wrong prompt source: A concept can point at images while failing to read the captions you expected.
- Uncontrolled augmentation: Flips and color changes can teach the wrong invariances.
- Changing data during training: A baseline isn't reproducible if files or captions change halfway through.
- Judging only loss: The best numerical loss isn't guaranteed to be the most flexible visual checkpoint.
Troubleshooting
The LoRA does nothing: Confirm the exported file loads, the base architecture matches, the trigger exists in training captions and inference prompts, and the test weight is visible.
Samples look memorized: Stop at an earlier checkpoint, remove duplicates, add meaningful variation, reduce total exposure, or use less adapter capacity.
Training changed after caption edits: Clear the relevant cache or create a new workspace/cache. Cached intermediates can preserve stale data assumptions.
You can't continue a run: Select the OneTrainer backup directory as the input source and keep compatible settings. Don't try to resume from an inference-only LoRA export.
Next Steps
Read the overview pillar, then finish the separate dataset and captioning checklists before starting a long job. Use the model-specific Flux requirements or SDXL training guide for architecture choices, and validate the export in a clean local Stable Diffusion setup.
Your second experiment should alter one variable: data, learning rate, rank, total exposure, or trained components. One controlled comparison beats a folder of mystery checkpoints.
