OneTrainer is a one-stop solution for all your stable diffusion training needs.
- Supported models: Stable Diffusion 1.5 and inpainting models
- Model formats: diffusers and ckpt models
- Training methods: Full fine-tuning, LoRA, embeddings
- Masked Training: Let the training focus on just certain parts of the samples.
- Automatic backups: Fully back up your training progress regularly during training. This includes all information to seamlessly continue training.
It is currently still in very early development. Planned features include:
- User friendly UI: I'm still evaluating options. The most likely solution is a web based UI.
- Different models: Training on all currently released Stable Diffusion models, this includes the base models (1.x and 2.x), inpainting models, the depth to image model, and SDXL once it is released
- Different training methods: Fine-Tuning, LoRA, Embeddings, ControlNet
- VAE fine tuning: Already implemented, but with limited functionality
Installing OneTrainer requires Python 3.10 or newer. Then follow these steps:
- Clone the repository
git clone git@github.com:Nerogar/OneTrainer.git
- Navigate into the cloned directory
cd OneTrainer
- Set up a virtual environment
python -m venv venv
- Activate the new venv
venv\scripts\activate
- Install the requirements
pip install -r requirements.txt
OneTrainer supports two modes of operation. Command line only, and a UI. the UI can be started by running the train_ui.py script.
All commands need to be run inside the active venv created during installation.
All functionality is split into different scrips located in the scripts
directory. This currently includes:
train.py
The central training scripttrain_ui.py
A UI for trainingconvert_model.py
A utility to convert between different model formatssample.py
A utility to sample any model
To learn more about the different parameters, execute <scipt-name> -h
. For example scripts\train.py -h
Contributions are always welcome in any form. You can open issues, participate in discussions, or even open pull requests for new or improved functionality. You can find more information here
Before you start looking at the code, I recommend reading about the project structure here. For in depth discussions, you should consider joining the Discord server.