A LoRA is a small add-on file that teaches an image model a new subject, character or style without retraining the whole model. Downloading LoRAs other people have made is easy. Training your own used to mean wrestling with scripts, but Ostris AI Toolkit makes it much more approachable. It's a free, open-source training suite for diffusion models that runs as a web UI or from the command line. This guide follows the project's official README on GitHub, checked on 23 November 2026.
AI Toolkit describes itself as an "all in one training suite for diffusion models", with the aim of supporting the latest models on consumer-grade hardware. It covers both image and video models. The supported list on the README is long and changes often. At the time of writing it included FLUX.1-dev, FLUX.2-dev and the FLUX.2 klein base models, Qwen-Image, Z-Image, Chroma, HiDream, Lumina 2, and the older SDXL and SD 1.5. Check the current list before you start, because support for new models is added regularly.
As well as standard LoRAs, it can train LoKr networks (a related adapter type from the LyCORIS project). You can also target or exclude specific layers of a model, which is useful once you're past the basics.
What you need
An NVIDIA GPU with enough video memory. The manual install instructions list "Nvidia GPU with enough ram to do what you need" as a requirement. The developer doesn't give one minimum figure, because it depends on the model. As a clue, the example FLUX.1 LoRA configs in the repository are named train_lora_flux_24gb.yaml and train_lora_flux_schnell_24gb.yaml, which points to a 24GB card for that model. Our guide to checking VRAM usage in Windows shows how much memory your card is really using once a job is running.
Git, to download the project. The recommended installer needs nothing else.
A Hugging Face account for gated models. For FLUX.1-dev, for example, the README says to request access on the model's Hugging Face page and log in with a read token.
Free disk space. The base model has to be downloaded, and every training run saves checkpoints and sample images to its output folder.
The manager also has Linux builds (x86_64 and ARM64, including NVIDIA's DGX Spark) and an experimental Apple Silicon Mac script. This guide sticks to Windows.
The README calls the built-in AI Toolkit Manager the recommended way to install and run the toolkit, although it's still labelled experimental. The manager detects your hardware and installs the right PyTorch build. It also creates the Python environment and downloads local copies of Node.js and FFmpeg. Everything stays inside the ai-toolkit folder, so nothing is installed system-wide.
First, install Git if you don't have it. Then open a terminal and download the project:
git clone https://github.com/ostris/ai-toolkit.git
cd ai-toolkit
Next, double-click run_windows.bat in the ai-toolkit folder, or run it from the terminal, and wait for the first-time setup to finish. On every launch, the manager checks for updates and applies them before starting the UI. It won't overwrite files you've changed: if you have local edits, the update is skipped with a warning.
The manager can also be run directly with python3 -m manager install, update, launch and doctor. The last one diagnoses problems, so try it first if something goes wrong.
If the manager doesn't work
The manual route needs Python 3.10 or later (3.12 is recommended), Git and a Python virtual environment. You clone the repository, create and activate a venv, install the specific PyTorch CUDA build listed in the README, then run pip install -r requirements.txt. Copy the exact PyTorch command from the README rather than from an old tutorial, because the pinned versions change. Our PyTorch with CUDA on Windows guide explains how PyTorch's CUDA builds work. For Windows problems, the README points to a community easy-install script (Tavris1's AI-Toolkit-Easy-Install on GitHub). With the manual route, the web UI also needs Node.js newer than version 20. You start it with npm run build_and_start from the ui folder.
Step 2: Open the web UI
Once it's running, open http://localhost:8675 in your browser. The UI is where you start, stop and monitor training jobs. The README notes that the UI doesn't have to stay open for jobs to keep running. It's only needed to control them.
If the PC is on a network you don't fully trust, set a password first. Set the AI_TOOLKIT_AUTH environment variable before starting the UI, and the UI will ask for that token. In PowerShell, for example: $env:AI_TOOLKIT_AUTH="your-long-password"; npm run build_and_start.
Step 3: Prepare your dataset
This is the step that decides how good your LoRA will be. AI Toolkit's rules are simple:
Put your training images in one folder. Only JPG, JPEG and PNG are supported. The README warns that WebP "currently has issues", so convert any WebP files first.
Give each image a caption in a plain text file with the same name, such as image2.jpg and image2.txt. The text file should contain only the caption.
To use a trigger word, write [trigger] in your captions and set trigger_word in the job config. AI Toolkit replaces the placeholder automatically.
You don't need to crop or resize. The loader handles mixed aspect ratios. It shrinks large images and sorts them into size buckets, but never upscales them, so very small images won't be enlarged.
As general practice, pick varied images of your subject or style (different angles, lighting and backgrounds) so the LoRA learns the subject itself rather than one particular photo.
In the UI, create a new job, choose the base model you want to train against and point it at your dataset folder. Then set the trigger word and the training options. If you'd rather work from config files, the README's command-line route works the same way:
Copy an example config from config/examples (for FLUX.1 that's train_lora_flux_24gb.yaml) into the config folder and rename it.
Edit it, following the comments in the file.
Run python run.py config/your_file.yml.
When a job starts, AI Toolkit creates a folder named after the job's name and training folder. All the checkpoints and sample images go there. Check the sample images as training goes on to see how the LoRA is progressing.
Stopping and resuming
You can stop a job at any time with Ctrl+C, and it picks up from the last checkpoint when you resume. There's one important warning in the README: if you press Ctrl+C while a checkpoint is being saved, that checkpoint will probably be corrupted. Wait until saving has finished.
Going further: layers and LoKr
The config's network section lets you train only some layers, using only_if_contains with a list of layer names, or skip layers with ignore_if_contains. If a layer matches both, ignore_if_contains wins. Setting the network type to lokr trains a LoKr instead of a LoRA, and the README says everything else, including layer targeting, works the same way. Leave these alone for your first runs.
Step 5: Use your LoRA
When training finishes, the LoRA file is in the job's output folder. Copy it into the LoRA folder of your image generator. Use it with the base model you trained it on. Our ComfyUI LoRA guide shows how to load it, set its strength and add your trigger word to the prompt.
If you don't have a big enough GPU
The README also explains how to run AI Toolkit on rented cloud GPUs, including an official RunPod template and instructions for Modal. The developer runs a paid service called Ostris Cloud as well. That's worth knowing if your card doesn't have enough VRAM for the model you want to train, but this guide is about training on your own PC.
Our verdict
Ostris AI Toolkit is one of the most approachable ways to train your own LoRA at home. The recommended manager sets up PyTorch, Node.js and FFmpeg inside one folder, the web UI handles jobs, and dataset prep comes down to images plus same-named caption files. What will hold you back is VRAM. You need an NVIDIA GPU, and the FLUX.1 example configs are labelled for 24GB, so start with a smaller model if your card has less. Use JPG or PNG images, never stop a job while it's saving, and load the finished LoRA with the base model it was trained on. Once you have one, our ComfyUI LoRA guide shows how to use it.