-
-
Notifications
You must be signed in to change notification settings - Fork 2
Training Guide
End-to-end workflow for training LoRA models, from dataset preparation to generating images with your trained model.
Dataset Upload → Auto-Tagging/Captioning → Tag Review → Training Config → Training → Model Export → Generate
- Drag-and-drop individual files or zip archives in the dataset page
- URL import — download files directly from URLs
- Local path — point to an existing directory on disk
- Images: PNG, JPEG, WebP, BMP
- Captions: TXT files (same name as image)
Place training images in a directory. Each image can have an optional .txt caption file with the same base name:
dataset/
├── image1.png
├── image1.txt # caption for image1
├── image2.png
└── image2.txt
Uses WD14 tagger to generate booru-style tags. Configurable in the auto-tag interface:
- Model — choice of WD14 v3 models
- Threshold — confidence threshold for tag inclusion
-
Overwrite mode —
overwrite(replace all),append(add to existing),ignore(keep existing) - ONNX runtime — auto-detected; enables acceleration if available
Generates natural language descriptions using BLIP models. Good for general scene descriptions.
Generates captions using GIT (Generative Image-to-Text Transformer). Similar to BLIP with different output characteristics.
The tag editor provides:
- Chip filter UI — multi-select tags to filter the image grid
- Bulk operations — add/remove/replace tags across selected images
- Replace with regex — pattern-based tag replacement
- Frequency viewer — see tag distribution across the dataset
- Trigger words — add at start or end of captions
See Configuration for full parameter details.
- Select model type — SDXL, SD1.5, Flux, SD3, Lumina, Anima, HunyuanImage
- Choose a preset — matches your model type and optimizer preference
- Set paths — pretrained model, dataset, output directory
- Configure optimizer — AdamW8bit is the safest starting choice
- Set resolution — match your base model (1024 for SDXL, 512 for SD1.5)
- Save and start
| Model | Status | LoRA Support | Notes |
|---|---|---|---|
| SD 1.5 | Stable | LoRA, LoCon, LoHa, LoKR | Legacy — widely tested |
| SDXL | Stable | LoRA, LoCon, LoHa, LoKR, DoRA | Primary target |
| Illustrious | Stable | LoRA, LoCon, LoHa, LoKR | SDXL-based |
| Pony | Stable | LoRA, LoCon, LoHa, LoKR | SDXL-based |
| NoobAI | Stable | LoRA, LoCon, LoHa, LoKR | SDXL-based |
| Flux | Experimental | LoRA, LoCon, LoHa, LoKR | fp8 base helps on 16 GB VRAM |
| SD 3.5 | Experimental | LoRA, LoCon, LoHa, LoKR | Needs real-world testing |
| Anima | Stable | LoRA, LoCon, LoHa, LoKR | High VRAM usage |
| Lumina | Stable | LoRA | Needs real-world testing |
| HunyuanImage | Stable | LoRA | Image generation only |
The UI provides real-time updates via WebSocket:
- Step count — current training step
- Loss — training loss value
- Learning rate — current LR (useful for schedulers with decay)
- ETA — estimated time remaining
- Log output — raw Kohya SS log stream
Training logs stream over WebSocket at ws://localhost:8000/ws/jobs/{jobId}/logs. The frontend connects automatically when training starts.
Every training run creates a job with:
-
job_id— unique identifier - Status:
pending→running→completed/failed - Progress: 0–100%
- Log buffer: last 1000 lines available via REST API
Use the "Stop Training" button in the UI to interrupt a running job.
- Civitai browser — search, filter by model type, download directly into local model folders
-
HuggingFace — use the model path directly (e.g.
runwayml/stable-diffusion-v1-5) -
Local files — place
.safetensorsfiles inpretrained_model/
After training completes, upload your LoRA directly from the utilities page:
- Authenticate with a HuggingFace token
- Set owner, repo name, and visibility
- Automatic README generation with training parameters
- Resize — change rank and alpha of a trained LoRA
- Merge — merge multiple LoRAs or merge LoRA into checkpoint
- Metadata — view and edit LoRA metadata
A bundled ComfyUI workspace is installed by default (both local and cloud). Use the generate page to:
- Test your trained LoRAs
- Browse available LoRAs via the LoRA Manager
- Generate images without leaving the app
To skip ComfyUI installation: install.bat --no-comfyui or ./install.sh --no-comfyui.
GPU-free tests validate the API and service layer:
pip install -r requirements_dev.txt
pytest tests/test_api_plumbing.py -v
New tests go in tests/. Tests requiring a real GPU: mark with @pytest.mark.slow.