Files
pics/train_lora.ps1

24 lines
530 B
PowerShell

#!/usr/bin/env pwsh
# train_lora.ps1 — run LoRA training from a config file
# usage: .\train_lora.ps1 training/my_lora.toml
param(
[Parameter(Mandatory=$true)]
[string]$config_file
)
$root = $PSScriptRoot
if (-not (Test-Path "$root/$config_file")) {
Write-Host "config file not found: $config_file" -ForegroundColor Red
exit 1
}
Set-Location "$root/kohya_ss"
.\venv\Scripts\Activate.ps1
accelerate launch `
--num_cpu_threads_per_process 2 `
train_network.py `
--config_file "$root/$config_file"