Sign In

AI Training with Ostris AI Toolkit

6

Jan 29, 2026

(Updated: a month ago)

training guide
AI Training with Ostris AI Toolkit

Edit (2026-02-11): added YAML script file for Z-Image Base

Introduction

In July 2024 I released my first LoRA, with some astonishment that it worked, even though it was not especially interesting or useful.

I have used a couple of different tools and considered others. Over time, I settled on Ostris' AI-Toolkit. I favor its ease of use and straightforward interface. In 2025, he continued to fix bugs and add features. One of the more useful features he added in 2025 was the ability to queue jobs. Before that, you needed to start a job manually after the previous one completed, without automation.

I won't describe the installation process. The notes on his site describe it well enough for Windows and Linux.

Scripts

Although settings can be made via the AI-Toolkit interface, I edit external scripts that hold my settings. AI-Toolkit offers an advanced interface giving access to the script to make your changes there. After editing the external text file containing my settings, I paste it into the Advanced view. This allows me to keep a record of every script I've used to create a LoRA.

AI-Toolkit_Buttons.png

Training

I train to 5000 steps. Then I test 3000, 4000 and 5000 step versions. Most commonly, I choose the 4k version. Only once did I choose the 3500 step version. Still, sometimes I find the 3k and 5k versions more faithfully produce the features I'm aiming for.

I've attached each script, one for Flux.1 Dev, Qwen, SDXL and Z-Image Turbo. In each you will find a tag that needs replacing, indicated by a string of 'xxxxxxx'. You also need to change the USER_NAME to match your own installation settings. The scripts are intended for use on Linux. You will need to make changes if running on Windows.

I always review the AI-Toolkit Simple view to ensure that all fields appear correct, especially the dataset reference.

Images

I generate datasets of either around 25 images or close to 50. If I can't do better than about 25, I use the Flip-X feature to mirror the images around the X axis, effectively creating another set. Not useful if your images include text. Usually the images are 1024x1024. One exception to this was my Postage Stamp LoRA, where I took real stamp images for training. It still produced an excellent result.

I always include captions for the images, using whatever captioning tool I have handy, which usually means Blip2.

AI-Toolkit Customization

The extent to which I customize AI-Toolkit is to change the port on which the GUI runs. I do this because I have several versions of AI-Toolkit installed at once. When I download a new version, I change the port again so I can access each installed version.

In <install_folder>/ui

Edit package.json. Towards the end of line 8, locate the following text:

next start --port 8711

Change the port number. Then access the UI on that port:

http://192.168.0.38:8771/dashboard

Conclusion

On my 3090 24GB card, an SDXL generation takes less than 90 minutes, Z-Image base and Z-Image turbo, 4.5 hours, Qwen 9.25 hours, Flux almost 6 hours.

6