Skip to content

Training Guide

The Duskfall Portal Crew edited this page Jun 12, 2026 · 1 revision

Training Guide

End-to-end workflow for training LoRA models, from dataset preparation to generating images with your trained model.


Workflow Overview

Dataset Upload → Auto-Tagging/Captioning → Tag Review → Training Config → Training → Model Export → Generate

1. Dataset Preparation

Upload Methods

  • 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

Supported Formats

  • Images: PNG, JPEG, WebP, BMP
  • Captions: TXT files (same name as image)

Dataset Organization

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

2. Auto-Tagging and Captioning

WD14 Tagging

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 modeoverwrite (replace all), append (add to existing), ignore (keep existing)
  • ONNX runtime — auto-detected; enables acceleration if available

BLIP Captioning

Generates natural language descriptions using BLIP models. Good for general scene descriptions.

GIT Captioning

Generates captions using GIT (Generative Image-to-Text Transformer). Similar to BLIP with different output characteristics.

Caption Editing

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

3. Training Configuration

See Configuration for full parameter details.

Quick Setup

  1. Select model type — SDXL, SD1.5, Flux, SD3, Lumina, Anima, HunyuanImage
  2. Choose a preset — matches your model type and optimizer preference
  3. Set paths — pretrained model, dataset, output directory
  4. Configure optimizer — AdamW8bit is the safest starting choice
  5. Set resolution — match your base model (1024 for SDXL, 512 for SD1.5)
  6. Save and start

Model Types

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

4. Monitoring Training

Live Training Monitor

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

WebSocket Connection

Training logs stream over WebSocket at ws://localhost:8000/ws/jobs/{jobId}/logs. The frontend connects automatically when training starts.

Job Tracking

Every training run creates a job with:

  • job_id — unique identifier
  • Status: pendingrunningcompleted / failed
  • Progress: 0–100%
  • Log buffer: last 1000 lines available via REST API

Stop Training

Use the "Stop Training" button in the UI to interrupt a running job.


5. Model Management

Downloading Models

  • 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 .safetensors files in pretrained_model/

Uploading to HuggingFace

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

LoRA Utilities

  • Resize — change rank and alpha of a trained LoRA
  • Merge — merge multiple LoRAs or merge LoRA into checkpoint
  • Metadata — view and edit LoRA metadata

6. Image Generation

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.


Testing

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.

Clone this wiki locally