AI Art

Setup and Run Ostris AI-Toolkit UI on Runpod


AI-toolkit is a powerful interface for training your own LoRA and provides lot of flexibility yet advanced functionality if you wish to explore it. In the past posts I have shared how to run this AI-Toolkit using its command line interface as shared in In Depth Tutorial using Ostris AI-toolkit on RunPod. But now a new Web Based UI has been released by the author that provides a wonderful user experience when you want to train your LoRA. You can create and setup multiple data sets which can then be used with Jobs that will train the LoRA.

In this post we are going to look at setting up and using this new version and more specifically the web UI of AI-Toolkit on Runpod.

It provides a nice clean interface that shows you the vitals of your GPU and how the job is progressing.

AI-Toolkit Resource

The AI-Toolkit is available on the Github page and is frequently updated by the author Ostris. The toolkit let’s you train LoRA for any model but UI supports Flux.1, Flex, Wan2.1 T2V 1.3b, Wan2.1 T2V 14b and Lumina Image.

Install AI-Toolkit on RunPod

Login to your Runpod account, create one for free if you are new to Runpod. Create a Pod with RunPod Pytorch 2.4.0 and any 24GB VRAM GPU (3090 or 4090) as a minimum. You can also get started with the ultra cheap A40 48GB VRAM.

Setup your Pod with:

  • Container Disk at 100GB
  • Volume Disk at 30GB (or more if you are training larger LoRAs)
  • Expose HTTP 8675 (8888 is default for Jupyter Lab) by adding it with a comma to separate the two ports

Install AI-Toolkit using the below command. You can simply copy and paste this in the Terminal of your RunPod.

git clone 
cd ai-toolkit
git submodule update --init --recursive
python3 -m venv venv
source venv/bin/activate
pip3 install --no-cache-dir torch==2.6.0 torchvision==0.21.0 --index-url 
pip3 install -r requirements.txt

Terminal is smart and it will execute all the lines of the command and run them sequentially. It should take 5-10mins to complete based on the pod you are using.

Launch a new Terminal Window and install NVM (NODE.js v23 latest) using the below command taken from this page.

curl -o-  | bash
. "$HOME/.nvm/nvm.sh"
nvm install 23

If you want to verify that nvm and npm is installed correctly, run the commands: node -v && nvm current && npm -v

The result should print:

v23.11.0
v23.11.0
10.9.2

Now we are ready to run the UI and launch it via RunPod console.

Launch AI-Toolkit UI

Before we launch open a new Terminal window and change directory to /workspace/ai-toolkit/ui . Once you are in this directory run the command npm run build_and_start

This will build the app and launch the interface on port 8675 which now can be opened via RunPod.

Training your LoRA on AI-Toolkit UI

Now we are ready to begin the training task which requires two main tasks: create the Dataset and create a Training Job

Once you have uploaded the images with their captions (need help with captioning – check out this). Training Job is where you now use the dataset and setup your preferences, to start off you can go with the defaults but enter you choice of trigger word, steps of training and captions for generating samples.

After that you can simply run the job and watch the magic happen.

Video Tutorial

I can imagine that many people either learn by reading or by watching a video tutorial, in that case you are in luck as I have published a Video tutorial for this post that walks through the entire process so you can be sure that it works.

Appreciate you making it all the way through the bottom of the post, hope you found this article useful and thanks for visiting.

If you’d like to support our site please consider buying us a Ko-fi, grab a product or subscribe. Need a faster GPU, get access to fastest GPUs for less than $1 per hour with RunPod.io

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button