Akegarasu/lora-scripts
Local sd-scripts workspace for diffusion training, dataset editing, and MCP agents
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
SD-Trainer wraps kohya-ss/sd-scripts in a local web workspace for configuring and running diffusion training jobs. gui.py starts the application and serves the built frontend from frontend/dist. The GUI and the scripts/train.ps1 and scripts/train.sh launchers use the same training implementation, bundled under scripts/dev and tracking sd-scripts v0.12.3. The Python runtime uses PyTorch with pinned dependencies including Accelerate, Transformers, Diffusers, safetensors, bitsandbytes, and LyCORIS.
Training and caption generation share a GPU queue. The GUI also enables a built-in MCP server by default, exposing Streamable HTTP at /mcp/ on the same local service; mcp_server.py provides an optional standalone stdio entrypoint. MCP clients can inspect datasets, submit runs to the existing queue, monitor logs and metrics, and read output images. This is an interface to the training workspace, not a separate execution backend.
Key Capabilities & Differentiators
The workspace supports LoRA and DreamBooth workflows, with a trainer catalog spanning SD, SDXL, SD3, FLUX.1, Chroma, Lumina, HunyuanImage 2.1, Anima, and MOSS-Image Base / SFT LoRA. The form adapts to the selected trainer and provides common and full parameter views, search, validation, and a setup checklist. Experimental trainers are marked, and MOSS-Image has separate model and dependency requirements. Runs retain configurations, status, and logs. Loss and learning-rate charts are read from TensorBoard-compatible event files without a separate TensorBoard server.
Captioning supports WD/CL taggers, BLIP/GIT-family models, and supported chat VLMs. It skips existing captions by default and lets users select images and review results before writing. The separate Tag Editor supports filters, suggestions, batch additions and removals, text or regex replacement, and normalization. Backups and conflict checks support rollback when caption files have not changed externally.
Trade-offs & Limitations
Compared with running kohya-ss/sd-scripts directly, SD-Trainer adds trainer-aware forms, dataset cleanup, run history, and agent integration without changing the underlying training engine. That helps when preparing datasets and iterating on experiments in one workspace, but a scripted pipeline may not need the frontend or MCP service. The shared queue means a captioning job can delay training. Size VRAM using representative runs for the selected model family, image resolution, batch size, precision, and training options rather than assuming a single hardware minimum.
Compared with managed training, self-hosting keeps the local training pipeline under your control but leaves driver compatibility, weight acquisition, storage, and job scheduling to you. The Windows cu128 build changes the software compatibility profile, not the GPU generation floor. Keep the default loopback binding where possible: broadening network access also changes who may be able to reach a service that accepts training jobs and exposes logs and outputs. Review AGPL-3.0 obligations before distributing builds or making a modified version available to users over a network.
Hardware & Deployment Guide
The quickest route on Windows x64 is the NVIDIA portable archive: it includes Python 3.11.9, the built frontend, and matching ONNX GPU runtime. The CUDA 13.0 build pairs with PyTorch 2.14.1 and needs an R580-or-newer driver; the CUDA 12.8 build uses PyTorch 2.11.0. Both require Turing or newer. Source installs need Git and recommend Python 3.11 x64; Python 3.10 must use the cu128 profile. Development checkouts require a frontend build with Corepack/pnpm and Node.js 22.12+ on the 22 LTS line or Node.js 24+. Node.js is not needed at runtime for the built frontend.
The Dockerfile builds the frontend in a Node 22 stage and packages it into a PyTorch CUDA runtime. The host needs a compatible NVIDIA driver and NVIDIA Container Toolkit; run with GPU access, publish port 28000 only to the intended interfaces, and mount datasets, model assets, and outputs under /app/lora-scripts. Supply weights and datasets separately; a self-hosted runtime does not mean the initial setup is offline. The v2 workspace unifies training configuration, captions, tag editing, and run metrics; the release history lists v1.10.0 in October 2024 and v2.0.0 in November 2026.
Individuals or teams with NVIDIA GPUs who repeatedly caption and clean image datasets, run local diffusion training, and want a single workspace with optional MCP access.
You only need an inference API, prefer managed GPU infrastructure, or already have a script-only training pipeline and do not need a GUI or agent integration.
Quick Start & Installation
docker build -t lora-scripts:local . docker run --gpus all -p 28000:28000 lora-scripts:local
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/Akegarasu/lora-scripts.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about lora-scripts
How do agents connect, and do they use a separate training queue?
How should I size GPU capacity and choose a CUDA profile?
Can a company self-host SD-Trainer?
When is this preferable to running kohya-ss/sd-scripts directly?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy