ArtificialGuyBR

Home / Blog / Training LoRAs

LoRA Training Settings: What Works and What Doesn't

Which LoRA settings actually work, and how to test them yourself.

6 sources cited Training LoRAs

TL;DR

LoRA Setting Claims That Hold Up

Several community settings align with the official Kohya_ss sd-scripts documentation [1,2].

SettingCommunity claimDocumented default / rangeVerdictSource
Learning rate0.0001 for U-Net and text encoder1e-4 common starting point (1e-4 to 1e-3)Confirmed [1]https://github.com/kohya-ss/sd-scripts/blob/main/docs/train_network.md
LR schedulercosine with restartscosine_with_restarts is a supported optionConfirmed [1]https://github.com/kohya-ss/sd-scripts/blob/main/docs/train_network.md
Mixed precisionbf16 on RTX 30-seriesbf16 and fp16 both supported; bf16 preferred if GPU supports itConfirmed [1]https://github.com/kohya-ss/sd-scripts/blob/main/docs/train_network.md
Save every N epochs1--save_every_n_epochs N is documentedConfirmed [1]https://github.com/kohya-ss/sd-scripts/blob/main/docs/train_network.md
MaxTrainEpochs vs. maxTrainStepsEpoch takes precedenceIf max_train_epochs set, it overrides max_train_stepsConfirmed [1]https://github.com/kohya-ss/sd-scripts/blob/main/docs/train_network.md
Alpha ≈ half of dimalpha 32 with rank 64"generally recommended to set it to about half the value of network_dim"Confirmed [1]https://github.com/kohya-ss/sd-scripts/blob/main/docs/train_network.md
Network dim rangeRank 64 used"Values between 4 and 128 are commonly used"Confirmed [1]https://github.com/kohya-ss/sd-scripts/blob/main/docs/train_network.md
SDXL network dimN/A in source32 or 64 often tried for SDXLConfirmed [2]https://github.com/kohya-ss/sd-scripts/blob/main/docs/train_network_advanced.md
SDXL learning rateN/A in source1e-4 ~ 4e-5 U-Net, 1e-5 ~ 2e-5 text encodersConfirmed [2]https://github.com/kohya-ss/sd-scripts/blob/main/docs/train_network_advanced.md
Gradient checkpointingNot in source"significantly reduce memory usage but slightly decreases speed"Confirmed [1]https://github.com/kohya-ss/sd-scripts/blob/main/docs/train_network.md

Terminology note: the community source writes "Koya_ss." The correct name is Kohya_ss (kohya-ss/sd-scripts) [1] — a misspelling, not a different tool.

Setting Claims That Cannot Be Verified

These specific configurations appear only as personal recommendations with no independent corroboration:

Treat these as starting points for your own testing, not as evidence-based recommendations.

The Regulation Image Claim

The most striking claim: removing 2,500 auto-generated regulation images improved LoRA quality [7]. The author reports going from "OK to poor results" to "quite good" after discarding them.

The mechanism is plausible: auto-generated captioned images from the source model can create a feedback loop where the LoRA reproduces the source model's biases rather than learning the dataset's concept — a known fine-tuning risk.

But this was uncontrolled. The author did not compare with/without side by side, nor isolate regulation images as the sole variable (dataset curation, cropping, and tag editing changed simultaneously). A controlled test would train two LoRAs with identical datasets except for regulation images, then evaluate blind.

Manual Cropping vs. Aspect Ratio Bucketing

The author ditched bucketing and manually cropped to 512×512 using Inbac [3], citing control over composition and smoother training.

Kohya_ss supports both via enable_bucket in the dataset TOML [1]. Bucketing groups by aspect ratio to avoid distortion — critical for non-square images. Manual cropping gives frame-level control but discards aspect-ratio diversity.

No controlled comparison exists. Choose based on your data: if images are near-square and curated, manual cropping works. If aspect ratios vary, bucketing avoids aggressive cropping.

WD14 Tagging and Tag Editing

The workflow uses WD14 tagger (in Automatic1111 and sd-scripts) for auto-captioning, then BooruDatasetTagManager [4,5] for editing. The author cuts eye-color and hair-color tags because the tagger "gets it wrong a lot."

BooruDatasetTagManager's documented purpose is a tag editor for hypernetwork, embedding, and LoRA datasets with batch editing and auto-tagging via AiApiServer [4]. It supports weighted tags, translation, and booru-style autocompletion [4].

Whether WD14's eye/hair color errors are common enough to warrant routine removal is untested. The practice is a reasonable heuristic but may discard semantic information that helps distinguish similar subjects.

How to Run Your Own Controlled Comparison

Isolate one variable at a time:

  1. Pick a fixed base model. (sd-legacy/stable-diffusion-v1-5 on HuggingFace is widely used.)
  2. Prepare two identical datasets. Same images, captions, train/test splits. Only the tested variable differs.
  3. Log every run. Save outputs per epoch, per prompt, fixed seeds. Kohya_ss supports --save_state for this.
  4. Evaluate blind. A second person (or yourself after a delay) ranks outputs without knowing which settings produced them.
  5. Measure, don't guess. Use consistent evaluation prompts and compare side by side.

All community-mentioned settings (network_dim, network_alpha, learning_rate, lr_scheduler, mixed_precision, save_every_n_epochs) are Kohya_ss command-line arguments [1], making single-variable swaps straightforward. See our Kohya_ss LoRA training guide for a full flag reference.

Common Errors and Fixes

Error in community postsDocs sayFixSource
"Koya_ss" instead of Kohya_ssRepository is kohya-ss/sd-scripts [1]Clone kohya-ss/sd-scripts, not a similarly named forkhttps://github.com/kohya-ss/sd-scripts/blob/main/docs/train_network.md
Expecting 20 epochs as "the right number"Author says they don't use 20 but wanted enough to find the sweet spot [7]Run more epochs, save each, evaluate which checkpoint is besthttps://civitai.com/articles/1161
Using fp16 on RTX 30-series (Ampere)bf16 and fp16 both supported; bf16 preferred if GPU supports it [1]Use bf16 when available; fp16 is for older hardwarehttps://github.com/kohya-ss/sd-scripts/blob/main/docs/train_network.md
Leaving regularization images in datasetAuthor found they degraded results [7]Try both with and without auto-generated images, evaluate blindhttps://civitai.com/articles/1161

FAQ

What is the best network rank for LoRA training? No universal best. Ranks 4–128 are common; docs default to 16 [1]. Higher ranks increase expressiveness, file size, and compute. Rank 64 suits complex concepts but produces larger files.

Should I use cosine_with_restarts or constant learning rate? Both are valid [1]. Cosine_with_restarts periodically raises LR (num_cycles controls restarts [2]), which may help escape local minima on long runs. Constant is simpler and effective for many workflows.

How many repeats do I need? The source used 10 repeats for 225 images and 20 for 79, later suggesting 5/50 as alternative [7]. No evidence favors either. The docs don't prescribe repeat counts. Start with what fits your budget, then evaluate output quality over step count. Can I use SD v1.5 for LoRA training and apply the LoRA to other models? The author reports training on sd-legacy/stable-diffusion-v1-5 and testing with Photon V1 and Reliberate V10 [7]. Cross-model LoRA transferability is not documented in any verified source. Results vary by target architecture and base checkpoint compatibility. See our LoRA cross-model compatibility guide for more.

What mixed precision should I use? Use bf16 if your GPU supports it (Ampere and newer); fp16 on older hardware [1]. bf16 reduces VRAM and can improve speed on supported GPUs. Fall back to fp16 if bf16 is unstable.

Is manual cropping better than aspect ratio bucketing? Neither is systematically better [1]. Bucketing avoids distortion for non-square images; manual cropping gives frame-level control. Both are supported.

How do I know which epoch is the sweet spot? Save every epoch (save_every_n_epochs=1), then evaluate different epochs. The author recommends starting at epoch 10 and working forward/backward [7].

What is the difference between network_dim and network_alpha? Network_dim is the LoRA rank — the adapter matrix dimensionality. Network_alpha scales LoRA weights during training; docs recommend ~half of network_dim [1]. A rank-64 LoRA with alpha 32 trains at half the effective LR of rank-64 with alpha 64.

Sources