gitwtfhub

wtf is sd-scripts?

kohya-ss/sd-scripts — explained in plain English

Analysis updated 2026-06-22

7,025PythonAudience · vibe coderComplexity · 4/5Setup · hard

TL;DR

A collection of Python scripts for training and fine-tuning AI image generation models like Stable Diffusion, FLUX, and SDXL on your own hardware using techniques like LoRA and DreamBooth.

Mindmap

mindmap
  root((sd-scripts))
    Supported Models
      Stable Diffusion
      SDXL
      FLUX.1
      SD3
    Training Methods
      LoRA
      DreamBooth
      Textual Inversion
    Utilities
      Model conversion
      LoRA merging
      Image tagging
    Setup
      Windows
      Linux WSL2
      CUDA GPU
    Audience
      Image creators
      AI artists

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Train a LoRA file that teaches Stable Diffusion your art style using a small set of your own images, without a full model retrain.

REASON 2

Fine-tune FLUX.1 or SDXL with DreamBooth to generate images of a specific person, product, or character.

REASON 3

Convert and merge LoRA checkpoint files between model formats, or resize a LoRA to reduce its file size.

What's in the stack?

PythonPyTorchCUDAWindowsLinux

How it stacks up

kohya-ss/sd-scriptspriorlabs/tabpfnfeast-dev/feast
Stars7,0257,0257,026
LanguagePythonPythonPython
Setup difficultyhardeasymoderate
Complexity4/52/54/5
Audiencevibe coderdatadata

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · hard Time to first run · 1day+

Requires a CUDA-capable Nvidia GPU, training large models without one is not practical.

Wtf does this do

sd-scripts is a collection of Python scripts for training and fine-tuning AI image generation models. The primary focus is on Stable Diffusion and its variants, but the project also supports other modern image models including FLUX.1, SDXL, SD3, LUMINA, and HunyuanImage-2.1. The scripts let you take an existing image model and teach it new visual styles, subjects, or concepts using your own image data. The most common use case is LoRA training, a technique that adjusts a small part of the model rather than retraining the entire thing. This makes training feasible on consumer-grade hardware and produces files that can be layered on top of base models without permanently altering them. The project also supports deeper training approaches such as DreamBooth fine-tuning, Textual Inversion (teaching the model a new word that refers to a specific concept), and inpainting model training. Additional utilities cover practical tasks like converting models between different formats, tagging images automatically using a separate AI tagger (WD14), merging multiple LoRA files, and resizing them. Multi-resolution dataset handling lets you train on images of different sizes at once. Installation is available for both Windows and Linux, including WSL2 on Windows. Documentation for most training workflows is provided in both English and Japanese, reflecting the project's roots and the bilingual community around it. The README also describes a setup path for developers who want to use AI coding assistants like Claude within the repository. The project is actively maintained with frequent releases. Recent updates added Intel GPU support, improved fp16 training stability, and extended LoKr and LoHa training techniques to SDXL and the Anima model preview. No license terms are stated in the README excerpt provided.

Yoink these prompts

Prompt 1
Walk me through setting up sd-scripts on Windows to train a LoRA for Stable Diffusion 1.5 using 20 of my own photos, including dataset folder structure and the training command.
Prompt 2
Show me the sd-scripts command to train a FLUX.1 LoRA with a specific learning rate and save a checkpoint every 500 steps.
Prompt 3
I have a trained LoRA file from sd-scripts. How do I load it in AUTOMATIC1111 or ComfyUI to use it for image generation?
Prompt 4
How do I use the WD14 tagger script in sd-scripts to automatically generate caption text files for my training images?

Frequently asked questions

wtf is sd-scripts?

A collection of Python scripts for training and fine-tuning AI image generation models like Stable Diffusion, FLUX, and SDXL on your own hardware using techniques like LoRA and DreamBooth.

What language is sd-scripts written in?

Mainly Python. The stack also includes Python, PyTorch, CUDA.

How hard is sd-scripts to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is sd-scripts for?

Mainly vibe coder.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.