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.
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.
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:
Install AI-Toolkit using the below command. You can simply copy and paste this in the Terminal of your RunPod.
git clone https://github.com/ostris/ai-toolkit.gitcd ai-toolkitgit submodule update --init --recursivepython3 -m venv venvsource venv/bin/activatepip3 install --no-cache-dir torch==2.6.0 torchvision==0.21.0 --index-url https://download.pytorch.org/whl/cu126pip3 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- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | 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.0v23.11.010.9.2
Now we are ready to run the UI and launch it via RunPod console.
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.
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.
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.