Home Creators Posts Import Register Favorites Logout

Downloads

Content

Hey everyone! I've created a 1-click installer for the newest "ULTIMATE KONTEXT LORA TRAINING Ai-TOOLKIT WEBUI". Simply one of THE BEST Ai model training Webui I have ever seen! Made specifically for complete beginners! And you can train any LoRA for any model you want, including now for Kontext! … It's just amazing!

You can check out the video right here: https://youtu.be/s9eXc8PmOos

The installer of course automates the entire install process!

LOCAL INSTALL!!! RECOMMENDED TO HAVE AT LEAST 24GB OF VRAM FOR THE KONTEXT LORA TRAINING! I know....I know...but if it's an issue, definitely use the Runpod installer instead, that's what I'm personally using even though I have 24Gb of vram as well!Local install:Requisites:– CUDA 12.8 (RTX-50) OR CUDA 12.6 (RTX-40/30/20/GTX)

– Git, Python 3.10 64-bit, Node 18/20 LTS

1. Download the AI-TOOLKIT-KONTEXT_AUTO_INSTALL.bat and place it in a folder WITHOUT any spaces in the path!!!

2. Run the bat file and select either option 1 or 2 depending on your GPU

3. Wait for the install to finish

4. ???

5. Profit 😎Use then one of the launcher once you have closed the ui and you want to restart it.

RUNPOD:

1. Create an account if you haven't already: Runpod

2. Click on Pod (on the left side) then click deploy

3. Choose a 5090 GPU (preferably), and chose the pytorch 2.8.0 then edit the template and choose 100GB for both the container and volume disk, then under expose ports, edit:8888 into 8888, 8675. Then go into environment variables below, click add and then type:AI_TOOLKIT_AUTH on the left then type a password on the rightthen scroll then and deploy.

4. Go to my pods, wait for everything to finish and then click "connect", then "Connect to HTTP SERVICE port 8888"

5. Then drag and drop the AI-TOOLKIT_AUTO_INSTALL-RUNPOD.sh file on the left side of the UI then click on the "Terminal" icon on the right side on the UI

6. Copy and paste these two lines then press enter:

chmod +x AI-TOOLKIT_AUTO_INSTALL-RUNPOD.sh

./AI-TOOLKIT_AUTO_INSTALL-RUNPOD.sh

7. Wait for everything to be installed

8. Go back to the port 8675 and click on it to launch the webui then enter your password you created previouslyIF YOU WANT TO RESTART THE UI AFTER STOPPING AND RESTARTING THE PODUse the same

chmod +x AI-TOOLKIT_AUTO_INSTALL-RUNPOD.sh

./AI-TOOLKIT_AUTO_INSTALL-RUNPOD.shcommand as you did for the installbut keep in mind that now your samples images will be located in: /workspace/ai-toolkit/datasets/samples/samples_1.jpg

As always, supporting me on Patreon allows me to keep creating helpful resources like this for the community. Thank you for your support - now go have some fun😉!

Files

Comments

HealingPaint

Installed Python 3.10.11 as per the video for the local install, and added to path, but because I also have and need python 3.12, apparently the detection still won't allow the install...so I had to disable that detection routine in the .BAT...hopefully the install works.

Aitrepreneur

You really need the 3.10.11, most ai tools use this version. The best workaround is to go into the environment variables and modify the path for the 2 python lines. C:\Users\YOURUSERNAME\AppData\Local\Programs\Python\Python310\ C:\Users\YOURUSERNAME\AppData\Local\Programs\Python\Python310\Scripts\ or you can add those two lines ABOVE the python312 lines so that it takes priority during the install. Then whenever you really need the 3.12, you can put the python312 lines above

Raziel Malichor

Quick question for anyone that might know. I'm wanting to make a Wan 2.1 Lora to animate a consistent character in VACE by having the character following the movement of a video I record and put in to the workflow. Would the training process be the same for a Wan Lora like it was for the Kontext Lora in the video, or would things like the training set folders be completely different, and if so, what would I do? Thanks for any help.

Aitrepreneur

Kontext is a completely different training altogether but I'm thinking that it's the same as training a normal model basically like flux just with videos I guess

Raziel Malichor

So you would just need a folder for your dataset and caption them in the toolkit? Not needing to worry about the other 2 folders like "control" and "sample" folders, obviously.

Raziel Malichor

Nice. Thanks for the help. Keep up the amazing work.

Josh

Does cuda 12.8 need to be installed locally or will it automatically be installed in the virtual environment?

Aitrepreneur

as I explained you need to have cuda 12.8 installed already (IF you have a 5000 series gpu)

Vincent Nestler

Hi In ran the installer and when I used the flux kontext json, the following came up missing: NunchakuFluxDiTLoader NunchakuFluxLoraLoader When I search for them, they do not come up. How do I resolve this? Thanks

Aitrepreneur

You need to update comfyui to the latest version or use the installer for comfyui from scratch

Tyler89537

Quick question about the dataset prep/captioning, should the caption still be in the text box if you go back into datasets? I notice that mine is missing if I return after previously typing them in.

Vincent Nestler

yes, updating comfyui did the trick. Thanks.

Ryan Prosser

Had same issue, changing the environment variables didn't seem to do it (even deleted my other python version, still no change, no idea why. I also removed the detection from the bat so I can get the install rolling, we'll see if it works or not

Mark

is there a way to start the service again on runpod after pausing the machine? instad of redownloading it all again? and with the samples folder/files - if i delete a photo and put another photo sames the same eg - samples_1.jpg - it shows up as the previous photo even though i deleted the old one and uploaded the new one?

Aitrepreneur

Ah...damn I always forget to set up the installer for that since I never restart a pod, I never keep a pod running, it just waste money (not a lot but still). I've modified the installer now, redownload the new version on this page. Use the same chmod +x AI-TOOLKIT_AUTO_INSTALL-RUNPOD.sh ./AI-TOOLKIT_AUTO_INSTALL-RUNPOD.sh command as you did for the install but keep in mind that now your samples images will be located in: /workspace/ai-toolkit/datasets/samples/samples_1.jpg

HealingPaint

I did exactly that, it's above my 3.12, and it still doesn't detect that I have 3.10, even after a reboot, so I just had to remove the detection part in the .bat and now it installs ans launches fine... it seems to be training fine, but I'll find out tomorrow when I can check the outcome.

Aitrepreneur

yeah I think this happens on the cloud, not quite sure why or if it's just a display bug and the captions are still there but better be safe and not go back to the dataset folder I guess lol.

Frank B

One question- soemthing not explained in your video, depending on what type of Lora you are traning is the Control dataset ALWAYS mandatory? in some cases, such as traning a persons face, how would the control data set even be applicable??

Betinho Formado

Hi, I had weird error on the local one clieck installer such like that : 60 packages are looking for funding run `npm fund` for details 4 vulnerabilities (1 low, 2 high, 1 critical) To address issues that do not require attention, run: npm audit fix To address all issues, run: npm audit fix --force Run `npm audit` for details. After that I run the webui and after when start training give me a error again and doesn't train the data very weird, I have all version of requirement install but still give me this issue. after trying to check on cmd the "npm audit" tag give this message "found 0 vulnerabilities"

Aitrepreneur

Well when choosing a training for the Kontext lora with Ai-toolkit, it automatically assumes that you want to do image pair training (hence you want to transform an image into another one) so if you want to do something like face training, well first choose Flux instead of Kontext since you probably want to generate new images with that Lora BUT if your goal is to transform a random person into you for example well in that case you train with pairs again, you have your control dataset images of random people and then your dataset with those random people transformed into images of you (now obviously here, just like I showed in my video, you create the dataset and control dataset THE OTHER WAY AROUND, you start with images of you and then use kontext to transform them into images of random people) Same with artstyle.

Aitrepreneur

these are normal actually it's fine, although for the error during training you didn't mention what that error was

Steve

I sent you a private message about the script you asked for as youtube kept deleting the link, the bunch of liberal pussies

Agino Terra

Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt Why I getting this stuff?

Kevin

I gpot a ton of these errors in runpod, normal? tar: lib/node_modules/npm/man/man1/npm-update.1: Cannot change ownership to uid 1000, gid 1000: Operation not permitted

Padraig Kane

if i wanted to train a human lora with the ai tool kit, and i have 20 photos of the human i want to Trian do i only need to use the data set folder and nothing else? or would that not work because i don't a have before pictures?

Padraig Kane

so this is what i done tell me if i'm right, i only created a dataset inside ai tool kit i put the 20 images into it, and i put prompts in to match the images example if the image was a dog sitting down i put a prompt underneath it "a dog sitting down" then i turn off all the sampling since i don't have any sample folder with images in it, i changed the model to flux.1-dev i got an access token and now the lora is training did i do it right? i just want to train a lora for character consistency all images 20 images where of the same character

Aitrepreneur

well yeah if you once want to do a flux lora training that's correct

Padraig Kane

what would be the newest best work flow to test this on i dont even know if it works i just want a basic flux.1-dev t2image work flow and i cant get one ahahahah

Padraig Kane

noway thanks so much do u have a workflow i could test it on, just a flux text 2 image. would do i think?

Padraig Kane

what model should i pick if i want to train a lora for the wan2.1 image creation theres is so many models to pick from on the tool kit i wasn't sure which one to pick, and sorry for spammy questions its just so hard to find out info about this stuff thanks again aitrepreneur!!

Padraig Kane

wan 2.1 (1.3B) wan 2.1 (14B) wan 2.1 (14b-480p) wan 2.1 (14b-720p) out f these i just ended up picking wan 2.1 (14B) hopefully it will work on the image creation

Eponym

I noticed my runpod's GPUs are currently unavailable after I stopped the pod. I know you don't do On-Demand, but maybe is there a workflow that we can create a network volume and start the pod with that? Or do we have to deploy a new pod every time we want to train?

Aitrepreneur

I personally redo the whole install each time I need it, hence why the 1 click installer, it takes 1 copy and paste and it's running again

Virtamouse

can you share your bat file with the section removed? When I tried to edit the file I received an error after the install which caused the app to crash on start.

HealingPaint

I use the SECURE_LAUNCHER-TOOLKIT.bat file, and it is: @echo off setlocal enabledelayedexpansion REM ================================================== REM AI-Toolkit — Secure UI Launcher (Password Prompt) REM Double-click to start / Ctrl+C to stop REM ================================================== REM Assumptions: REM • This file lives inside the ai-toolkit root folder REM (next to the "ui" directory and "venv" folder). REM • You have already run the full installer once. REM -------------------------------------------------- :: Check venv exists if not exist "venv\Scripts\activate.bat" ( echo [ERROR] venv not found. Run the installer first. pause exit /b 1 ) :: ------------------------------------------------- :: Ask for password :: ------------------------------------------------- echo. echo Enter a password to protect the AI‑Toolkit UI. set /p UI_PWD=Password: if "%UI_PWD%"=="" ( echo No password entered. Aborting. pause exit /b 1 ) set "AI_TOOLKIT_AUTH=%UI_PWD%" echo Password set. :: ------------------------------------------------- :: Activate Python venv :: ------------------------------------------------- call "venv\Scripts\activate.bat" :: Kill any stray Node servers (frees port & file locks) taskkill /F /IM node.exe >nul 2>&1 :: Change into UI directory cd ui :: Launch UI with password protection echo Starting AI‑Toolkit UI on http://localhost:3000 echo Press Ctrl+C to stop the server when you are done. npm run build_and_start endlocal

Virtamouse

Thanks. I got the error when running the installer. Did you update your installer bat file also?

Manic

No module named 'dotenv' is preventing me from starting my lora training. help

Bruno Sartori

I'm trying to run the code, but I have below. Anyone else having this issue? How can I help? (venv) I:\WORKSPACE\ai-toolkit\ui>npm run build_and_start ai-toolkit-ui@0.1.0 build_and_start npm install && npm run update_db && npm run build && npm run start up to date, audited 446 packages in 2s 61 packages are looking for funding run npm fund for details 5 vulnerabilities (1 low, 2 high, 2 critical) To address issues that do not require attention, run: npm audit fix To address all issues, run: npm audit fix --force Run npm audit for details. ai-toolkit-ui@0.1.0 update_db npx prisma generate && npx prisma db push Prisma schema loaded from prisma\schema.prisma ✔ Generated Prisma Client (v6.3.1) to .\node_modules@prisma\client in 48ms Start by importing your Prisma Client (See: https://pris.ly/d/importing-client) Tip: Want to react to database changes in your app as they happen? Discover how with Pulse: https://pris.ly/tip-1-pulse Prisma schema loaded from prisma\schema.prisma Datasource "db": SQLite database "aitk_db.db" at "file:../../aitk_db.db" The database is already in sync with the Prisma schema. ✔ Generated Prisma Client (v6.3.1) to .\node_modules@prisma\client in 51ms ai-toolkit-ui@0.1.0 build tsc -p tsconfig.worker.json && next build ▲ Next.js 15.1.7 Creating an optimized production build ... Failed to compile. Error: EISDIR: illegal operation on a directory, readlink 'I:\WORKSPACE\ai-toolkit\ui\src\app\api\caption\get\route.ts' Build failed because of webpack errors (venv) I:\WORKSPACE\ai-toolkit\ui>

Aitrepreneur

DM your full error log and what gpu you rented

Bruno Sartori

The text above contains the entire error log that appears in the CMD window. I'm using a 5090.

Aitrepreneur

You are using runpod, so make a new pod and retry again, I'm doing a training as we speak so it's not the installer

Bruno Sartori

No. I'm not using it. I'm using Windows. This installation was done on Windows with its .bat file. I've reinstalled it three times and none of them worked.

florentruppert2023

this morning it doesn't work anymore on runpod, I follow as usual this beautiful tuto, but this time on jupiter, after being ask which type of computer I use (I type 1 ) the log stop after this: ... Get:21 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [83.2 kB] Get:22 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [35.2 kB] Fetched 40.3 MB in 2s (16.1 MB/s) Reading package lists... Done E: Failed to fetch https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/Packages.gz File has unexpected size (1852870 != 1850507). Mirror sync in progress? [IP: 23.205.107.17 443] Hashes of expected file: - Filesize:1850507 [weak] - SHA256:97960e9159be087be063fd3fcd63217a13dcd40b7ae329f38ddcee2541e2406b - SHA1:7baa6fed520300c1fdb5eb10ca02367f0806deb9 [weak] - MD5Sum:4f4f50310c11c9a0ba217aacc75d8f47 [weak] Release file created at: Tue, 22 Jul 2025 19:05:10 +0000 E: Some index files failed to download. They have been ignored, or old ones used instead. is it bad doctor ?

Aitrepreneur

Have you did everything step by step?? It still works for me, maybe there was some network issues when you tried? Retry again and let me know

James Bowler

I followed your video exactly. But for me I noticed when I tried running the Kontext training all my samples say step: 0. I went round and round with ChatGPT. Regardless, I made all of my pics jpg's. And put a phrase similar to your Gigachad. And all my samples, even with my GPU(RTX 3090 24GB) churning for 2.5 hours, steps: 0 !! TIA, James

Aitrepreneur

hmm weird indeed, any error in the cmd window?

James Bowler

Nope, it just runs along churning for 2.5-3 hrs. It completes 5 checkpoints. But all the sample images. Shows step: 0. Do you think my caption phrase would not cause it to cycle through the samples. Which I figured out have to be 1x1. The dataset and controlset are paired up correctly. I converted them all to jpg, they are all the same aspect ratio, but some differ in resolution, but I assume buckets is enabled. Possibly the Flux Kontext diffuser model did not download intact? Thanks for your help. I am basically trying to build my own SFW nipple under clothes 'enhancer'. I have all the images ready to go, before and after. Thanks again for all your hard work!

Pak26

I rented a RTX 5090 on Runpod and i'm having the same issue as when I made some trainings with a Pro 6000 is that sometimes the GPU just stop suddenly working and just stay at zero with no apparent reason. I then need to stop the training and restart it. Does it happen to you sometimes ? Thx