NokiMo
Aitrepreneur
Aitrepreneur

patreon


1-Click INSTALL KOHYA SS GUI

Hey everyone! I've created a 1-click auto installer for KOHYA SS GUI, a tool to train LORA for Stable Diffusion. These file automates the entire install process with just 1-CLICK!

Here's how it works:

1. Download the batch file from this Patreon post and put it in an empty folder somewhere on your computer.

2. Double click the batch file to run it. The file will automatically:

- Install Python and other dependencies IF you don't have it installed already
- Install Git IF you don't have it installed already
- Clone the Kohya ss Gui repository from GitHub
- Launch Kohya ss Gui installation process

Once the installation has started it will ask you a few questions that you will need to answer depending on your situation.

If you are installing locally, here's what you need to input and press enter to confirm:

Kohya_ss GUI setup menu:

1. Install kohya_ss gui

2. (Optional) Install cudann files (avoid unless you really need it)

3. (Optional) Install specific bitsandbytes versions

4. (Optional) Manually configure accelerate

5. (Optional) Start Kohya_ss GUI in browser

6. Quit

Enter your choice: 1

--------

1. Torch 1 (legacy, no longer supported. Will be removed in v21.9.x)

2. Torch 2 (recommended)

3. Cancel

Enter your choice: 2

--------

In which compute environment are you running?

Please select a choice using the arrow or number keys, and selecting with enter

* This machine

AWS (Amazon SageMaker)

--------

Which type of machine are you using?

Please select a choice using the arrow or number keys, and selecting with enter

* No distributed training

multi-CPU

multi-GPU

TPU

--------

Do you want to run your training on CPU only (even if a GPU / Apple Silicon device is available)? [yes/NO]:  NO

--------

Do you wish to optimize your script with torch dynamo?[yes/NO]: NO

--------

Do you want to use DeepSpeed? [yes/NO]: NO

--------

What GPU(s) (by id) should be used for training on this machine as a comma-seperated list? [all]: all

--------

Do you wish to use FP16 or BF16 (mixed precision)?

Please select a choice using the arrow or number keys, and selecting with enter

no

fp16          -----> If GPU older than NVIDIA 3000 series (1080, 970, etc...)

bf16         -----> If GPU newer than NVIDIA 3000 series (3080, 3090, 4090, etc...)

fp8

the accelerate configuration saved at C:\Users\USERNAME/.cache\huggingface\accelerate\default_config.yaml

Let me know if you run into any issues getting it set up!

And as always, supporting me on Patreon allows me to keep creating helpful resources like this for the AI art community. Thank you for your support - now go train some awesome LORAs!

1-Click INSTALL KOHYA SS GUI

Comments

Hello. Got this error at the end of installation : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\dataclasses.py", line 815, in _get_field raise ValueError(f'mutable default {type(f.default)} for field ' ValueError: mutable default for field conv_cfg is not allowed: use default_factory [04/21/25 00:31:32] ERROR Error occurred while running command: accelerate config setup_common.py:683 ERROR Error: Command 'accelerate config' returned non-zero exit status 1. Any clue ?

Pierre Barbetti

I cant get this run, i double clicc on kohta installer, its loading like a software option untill reach like 2080000 end then quit. help me pls

Spam Ex

well looks like the install is finished, what's the issue?

Aitrepreneur

Hey when I'm running the setup.bat and the installation of the kohya_ss gui I get back to the setup menu. So its installing everything, showing a lot of data and loading and then I get this: ________________________________________________ [notice] A new release of pip available: 22.3.1 -> 24.2 [notice] To update, run: python.exe -m pip install --upgrade pip 18:20:46-477945 INFO Requirements from requirements_windows.txt installed. Configuration already exists at C:\Users\redak/.cache\huggingface\accelerate\default_config.yaml, will not override. Run `accelerate config` manually or pass a different `save_location`. Kohya_ss setup menu: 1. Install kohya_ss GUI 2. (Optional) Install CuDNN files (to use the latest supported CuDNN version) 3. (DANGER) Install Triton 2.1.0 for Windows... only do it if you know you need it... might break training... 4. (Optional) Install specific version of bitsandbytes 5. (Optional) Manually configure Accelerate 6. (Optional) Launch Kohya_ss GUI in browser 7. Exit Setup Select an option: ________________________________________________ I was trying to upgrade pip with that command, but its still there and i deleted the folder. But doesnt help.

Mr.Rie asd

uninstall all python versions and install the 3.10.11 version

Aitrepreneur

I am very confused with what's happening on my end. It opened at first, then it gave me a python installer. I installed that version of Python, then it asked what I wanted to do so I pressed 1. It told me I needed another version of Python so I installed that version. Now when I open the 1-click.bat file it just instantly closes. I've tried uninstalling all python versions, but it still just instantly closes now. Any idea as of what I might be doing wrong?

SleepyNado

just install the python 3.10.11, this is the version I recommend nowadays for all AI tools anyway

Aitrepreneur

((After I press # 1, this appears. I checked Python and no updates occur between 3.10.9 and less than 3.11.0 on their site. Python 3.10.14 says no files for this release. ))08:00:43-160424 INFO Kohya_ss GUI version: v24.1.6 08:00:43-167588 INFO Python version is 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] 08:00:43-169587 ERROR The current version of python (sys.version_info(major=3, minor=10, micro=6, releaselevel='final', serial=0)) is not appropriate to run Kohya_ss GUI 08:00:43-170587 ERROR The python version needs to be greater or equal to 3.10.9 and less than 3.11.0

Eyes_Wide_Shut

If I remember, for some reason now it displays a max steps of 1500-1600 (don't remember) that you need to put to 0 if you want to keep training normally like before

Aitrepreneur

Hello, I followed your SDXL training tutorial, but in the end, I ended up with only 1 .safetensor. I put 5 or 10 Epochs and despite everything, Kohya only calculates one Epoch. Is it because your tutorial is now a year old and Koya has changed a bit since then? Lora works, but I can't decide which one works best. any idea why? Thanks again !

koumac kouini

Yup well as the error says, you have installed kohya in a folder with spaces (also in a onedrive folder as well) so reinstall it in a normal folder without any spaces in the name

Aitrepreneur

Hi There! I'm Newby, trying to install Kohya , but igot this ERROR... Can You help me? 20:15:17-332566 INFO Kohya_ss GUI version: v24.1.4 20:15:17-356287 ERROR The path in which this python code is executed contain one or many spaces. This is not supported for running kohya_ss GUI. 20:15:17-362249 ERROR Please move the repo to a path without spaces, delete the venv folder and run setup.sh again. 20:15:17-367021 ERROR The current working directory is: C:\Users\rodri\OneDrive\Desktop\KohYa SS 2024\kohya_ss

Rodrigo Gallardo

oh saw comment above and found it nevermind!

Nastya Semerey

thanks for your guide. there is no "depricated" tab in lora tools, tried to run kohya one more time but it didn't appear. what should i do in this case?

Nastya Semerey

CalledProcessError: Command '['C:\\AI\\kohya_ss\\kohya_ss\\venv\\Scripts\\python.exe', 'C:/AI/kohya_ss/kohya_ss/sd-scripts/sdxl_train_network.py', '--config_file', 'C:/AI/Training\\model/config_lora-20240516-194619.toml']' returned non-zero exit status 1.

Adam

ahh okay thank you, yes looks like it was the python installation. its fixed now. However i always get this error once "start training" :

Adam

yes that's normal that means you don't have python installed (or at least installed correctly) but it should do everything else, what happens in the command prompt window?

Aitrepreneur

Not sure if this is old, but the BAT file just seems to download a python file onto my pc

Adam

you can dm me some screenshots of the parameters, output folder and the log inside the command prompt, difficult to see what went wrong without more info

Aitrepreneur

Hi Aitrepreneur! thank you so much for your tutorial on training LoRAs - I got right to the end of it, prepped the files with blip etc, but when I press train model the files that I end up with in the model folder are not safetensors. There is one .toml file, one empty text file called 'prompt' and one that is marked as After Effects file?? very strange, but also the training takes like 1 minute, while I imagine it should take at least 40 min.

Tamika Batalova

altough the ui changed a bit, it's the exact same thing, nothing changed there. I'm waiting for the SD3 release to do an update on this

Aitrepreneur

I think we do need an update on manuvering the usuer interface on kohya ss as its changed alot since this tutorial and i'm just sinking my teeth into this. i've purchased the patron for the regularization dataset but now have to see elsewhere on youtube for updated videos on the workflow as i'm gettin some errors and issues

Robbie Zek

I think you can try training it as a style, it is a style after all, loras are much more, powerful than hypernetwork so with the right training you should get decent results, I made style lora training video as well you can check out

Aitrepreneur

I wanted to ask whether you have any advice on using Kohya for training a sort of ambience of a specific location? I guess you would call it a 'style', but if I need to get consistency between images via lighting/ colours/ setting ... I'm working purely with generating objects and spaces, without any people, and inputting my own photographs/ renders. I've used hypernetwork for this in the past before loras and sdxl , but wondering if LoRas is the right thing to use in my case! all the info on training that I find are majorly on celebrity likeness and portraits etc. hope somebody has an opinion on this!

Tamika Batalova

oh I see, that makes sense!

Tamika Batalova

Kohya is a webui for training so the results of that training can indeed be used inside comfyui

Aitrepreneur

hi can i use Kohya with ComfyUI?

Tamika Batalova

yes looks like they might have changed the python requirement version lately, you need to uninstall your current python installation and reinstall it correctly. Go to the add and remove programs, search for python and uninstall both the current python version and the python install program. Once this is done, go here and download this installer: https://www.python.org/ftp/python/3.10.11/python-3.10.11-amd64.exe Run it and check the “Add python 3.10 to Path” checkbox and continue with the installation.

Aitrepreneur

I'm trying to install Kohya with the 1 click installer but I'm getting a python error. I click on the gui.bat but it crashes. This is the error I get: 15:43:13-265108 INFO Kohya_ss GUI version: v24.0.9 15:43:13-276072 INFO Python version is 3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)] 15:43:13-279072 ERROR The current version of python (sys.version_info(major=3, minor=10, micro=7, releaselevel='final', serial=0)) is not appropriate to run Kohya_ss GUI 15:43:13-282070 ERROR The python version needs to be greater or equal to 3.10.9 and less than 3.11.0

Mr Sincere

haha yeah that's normal, that means everything was installed correctly :D Just run the gui.bat file now

Aitrepreneur

I am trying to install this with the 1-Click installer but it keeps looping me into the "Kohya_ss Setup menu". I don't get the option to select Torch 1 or 2 after the initial install is complete. I think the file needs to be updated as well but if you could provide some insight that would be great First time running the batch file: https://gyazo.com/e1f81f049e0fb9dc472d47379e574c12 After the install it loops back to the same menu: https://gyazo.com/cb7a0ee944831cbd1f727c4ac25381c9

illicit Gaming

getting this error @echo: command not found Checking and installing necessary software... kohya.bat: line 3: $'\r': command not found kohya.bat: line 4: syntax error near unexpected token `(' 'ohya.bat: line 4: `REM Base Directory (can be updated if necessary)

Kool Teche

How can I run this on runpod ?

Kool Teche

I need the full error log

Aitrepreneur

gubbug

what problem?

Aitrepreneur

im getting the same problem

Shaun Bass

dm me the full error log, that python version shouldn't be a problem

Aitrepreneur

I have python 3.10.6 being installed by the 1-click installer but im getting that same error ERROR The python version needs to be greater or equal to 3.10.9 and less than 3.11.0 but i only have what i installed from your previous 1 clicks which is 3.10.6 and the one-click installer looks like its installing 3.10.6 so im not sure if this is meant to be or what this is the one click installer: REM Check and install Python python --version > NUL 2>&1 if %errorlevel% NEQ 0 ( echo Installing Python 3.10.6... powershell -Command "& {Invoke-WebRequest -Uri 'https://www.python.org/ftp/python/3.10.6/python-3.10.6-amd64.exe' -OutFile 'python-3.10.6-amd64.exe'}" if %errorlevel% NEQ 0 ( echo Failed to download Python installer. exit /b ) start /wait python-3.10.6-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 del python-3.10.6-amd64.exe ) else ( echo Python already installed. )

Marco Santos

usually most webui creates a virtual env so it shouldn't be an issue but for kohya you need the 3.10 python version

Aitrepreneur

I keep running into errors trying to make this install. The setup.bat file will not run because it's using the wrong version of python. Can I force it to use a specific version? It seems like each of these webui need different versions to run correctly. I have Python 3.10, 3.11, and 3.12 installed.

Matthaeus

you probably have an incompatible python version, you need a 3.10 version. but you can try this: once you get that same error, type: pip install --upgrade --force-reinstall setuptools press enter and try again

Aitrepreneur

When I try to sun the setup it carries on telling me that "ModuleNotFoundError: No module named 'pkg_resources'" and I've tried to do as much research as possible, are you able to help?

ForgotenFallenAngel

dm me the full error log

Aitrepreneur

I have the issue where i installed it and it worked and it loaded up kohya but then when i try to load it up again it doesnt work says it cant find pytorch. also i wanted to copy it to another folder on my pc but that isnt working either

Josh Greenberg

failed to download git installer

Simon

hey after "web request is being written" the cmd window just closes and nothing happenes

Simon

I have found the problem. Use the 1 click config it will use Adafactor. The problem seems to occur when you change the optimizer AdamW to Adafactor. AdamW does not have the problem but Adafactor does. But i do not know how to fix it

Flynn Chen

Hi, I am facing this issue. --num_processes was set to a value of 1 --num_machines was set to a value of 1 --mixed_precision was set to a value of 'no' --dynamo_backend was set to a value of 'no' so my modules is not training perfectly. My mixed_precision is not bf16. I used 1 click bat file installed KOHYA SS GUI. Thank you very much!

Flynn Chen

you mean on runpod? Then yes, you can put your files in google drive and use the gdown command to quickly dl all of your files. The command should look like this: gdown https://drive.google.com/uc?id=xxxxxx where xxxxxx is the id of the Google Drive shared file

Aitrepreneur

Hey Aitrepreneur! Is it possible to connect Kohya with Google Drive like on Colab? I want to place my Datasets and Loras etc. on Google Drive. Thank you very much!

Patrick Amrhein

I need more info, like the full error log and GPU

Aitrepreneur

at this point the cmd window just shuts down

Mack Met

I run the installer but this is as far as I'm able to get, I have antivirus and firewall turned off during installation. Any ideas? Checking and installing necessary software... Installing Python 3.10.6... Writing web request Writing request stream... (Number of bytes written: 26836992)

Mack Met

me sale este error "No se esperaba .lnk en este momento. C:\Users\Lukas Busto F\Downloads\kohya_ss> " porque sera?

Lukas Bustos Fuentes

Just delete everything and reinstall in a new folder

Aitrepreneur

i Closed this half way through as I messed something up can i restart it wont let me?

95clockwise

what's your pc specs? Make sure you disable any antivirus/firewall before running the installer that could block the file or limit the connection

Aitrepreneur

Hey. Im installing or trying to but its not working When setup runs, I click on 1. Install kohya_ss gui and it doesnt ask the next question about torch It just starts installing package and gets stuck no matter how long I wait. Any ideas what Im doing wrong ?

windows yes

Aitrepreneur

Is this for PC only?

Dustin Hollywood

weird, do you see any errors when running the installer?

Aitrepreneur

There is a problem with the installer. I created a folder where I want the kohya_ss folder and files to be stored. I then copied the installer to the folder I created as you have done in your video. I run the installer and the folder and files either do not write to the disk or are written some where else. I then have to run the installer again and THEN I see the folder and files. I have this issue every time and this issue can easily be reproduced.

Liam

I reinstalled python and it works now. Thank you for the help tho

Manuel Gaus

I Installed Python 3.10.9, Visual C++ and GIT. Could it be because I installed SDXL manualy without any of your videos?

Manuel Gaus

well, is everything installed already?

Aitrepreneur

After the Kohya_ss downlaod and step 1 "Install Kohya_ss gui" there are no more choices coming up, just this: Kohya_ss GUI setup menu: 1. Install kohya_ss gui 2. (Optional) Install cudann files (avoid unless you really need it) 3. (Optional) Install specific bitsandbytes versions 4. (Optional) Manually configure accelerate 5. (Optional) Start Kohya_ss GUI in browser 6. Quit Enter your choice: 1 21:01:55-257790 INFO Version: v22.4.1 21:01:55-262777 INFO Python 3.10.9 on Windows 21:01:55-266776 INFO Installing modules from requirements_windows_torch2.txt... 21:01:55-273778 INFO Installing package: torch==2.0.1+cu118 torchvision==0.15.2+cu118 --index-url https://download.pytorch.org/whl/cu118 21:06:24-066901 INFO Installing package: xformers==0.0.21 21:06:34-119435 INFO Installing package: bitsandbytes==0.41.1 Is there a way to fix this?

Manuel Gaus

01:32:20-455100 INFO Version: v22.4.1 01:32:20-455100 INFO Python 3.9.5 on Windows 01:32:20-455100 INFO Installing modules from requirements_windows_torch2.txt... 01:32:20-470116 INFO Installing package: torch==2.0.1+cu118 torchvision==0.15.2+cu118 --index-url https://download.pytorch.org/whl/cu118

VRl

install completely stops at

VRl

What's your pc specs?

Aitrepreneur

Hi!! when I press 1 for the "1. Install kohya_ss gui," my laptop gets hanged, and I need to restart it manually.This happens everytime whenever I am trying to run it. any solutions will be DEEPLY appreciated.

Kashif Salman

I saw that for this you might be inputing the wrong output path, try changing the output from this d:\some_dir\output\ to this d:/some_other_dir/output

Aitrepreneur

I keep getting an error trying to train. tried re-install with python 3.11 and 3.10 both: Traceback (most recent call last): File "P:\AI\kohya_ss\sdxl_train_network.py", line 189, in trainer.train(args) File "P:\AI\kohya_ss\train_network.py", line 247, in train network_module = importlib.import_module(args.network_module) File "C:\Users\mikef\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 117, in import_module if name.startswith('.'): AttributeError: 'NoneType' object has no attribute 'startswith'

What to watch high

Do not run as admin! As always, If a cmd closes automatically that means that either your antivirus or firewall is blocking the file from running further, either deactivate them for a few minutes or add an exception for the file before running.

Aitrepreneur

its downloading python then vanishes, windows 11, firewall disabled, running as admin.

Michael I

If a cmd closes automatically that means that either your antivirus or firewall is blocking the file from running further, either deactivate them for a few minutes or add an exception for the file before running. The chat bot doesn't automatically download a model because there is like 1000s of them and people have different configuration like no GPU, also they need to download new models themself anyway it's not that hard it's literally a copy and paste of the model name then click download....

Aitrepreneur

Man this is bullshit. I'm frustrated. I paid you for the 1 click installers, none of them work. Your stable diffusion just starts a cmd then closes it immediately without doing anything, your chat bot ai doesn't have any models so it does nothing, why wouldn't it download models???, and this Kohya asks me to choose 1 through 6, I choose 1, and it does nothing. Cmon bro, what is up? I might need a refund bro, unless you can help me get this stuff working.

Night Wolf

what red line? Send me a dm with more info

Aitrepreneur

Hi. Will load the program, but the url link is dead. No red line under it.

Dave Geddes

Got issues running the SDXL training, response was RuntimeError: cuDNN error: CUDNN_STATUS_INTERNAL_ERROR How do I fix this?

if you already have python and git installed you can try this simpler installer: https://we.tl/t-kISfko4BkL

Aitrepreneur

Just joined for the 1-click install as well, doesn't work for me either. Firewall and avg both off, tried uninstalling python, same thing as people above. It downloads a python install executable and does literally nothing else and just closes.

JN

Hi, Im looking for the SDXL.json file for Kohya SS

Zahir Kahn

Do not run as admin, it's usually the antivirus and or firewall blocking the file from running any further, disable them for a few minutes before running the file, also for some antivirus you might need to add an exception to allow the file to run

Aitrepreneur

hey this is not working for me, i just subbed for the 1 click install, and its only downloading phyton but not installing any else.. As soon as it downloads the phyton it closes the CMD and stops doing anything.. i trying running as admin same issue.. its basically not installing

Jonatan Hernandez

Send me a dm with more details and screenshot if possible

Aitrepreneur

Got the following error when installing Kohya: 18:00:36-995511 ERROR Incompatible Python version: 3.11.4 required 3.[9, 10] ... 18:17:00-025504 INFO Installing package: onnx==1.14.1 18:17:11-201336 INFO Installing package: onnxruntime-gpu==1.16.0 18:17:30-013445 ERROR Error running pip: install --upgrade onnxruntime-gpu==1.16.0 ... 18:18:26-339695 INFO Installing package: wandb==0.15.11 18:18:35-241494 INFO Installing package: -e . 18:18:40-846687 ERROR Error running pip: install --upgrade -e . What should I do?

Han Wei Tan

Thx for your work !!!

pib boris

Hi /

pib boris

Hey, usually slow training speed is a driver issue BUT in your case your gpu is too old to do the training faster, what matters in using AI tools is Vram (video ram) not RAM. For training a sdxl model you need at least 12GB of Vram, a Gtx 1070 only has 8GB of Vram. So you can either train a SD 1.5 model which requires less Vram to train or rent a GPU on a website like Runpod if you really need to train a SDXL model.

Aitrepreneur

Hi! Thank you so much for this installation file. I'm having a problem that even with low parameters (5 epochs, 32 network dimension) my computer expects to do it 15+ hours. I have 32Gb RAM, but a relatively old video card (Nvidia GTX 1070). What would you recommend to speed the process up?

Tania

there was probably some issue during the update, try double clicking on the setup.bat file and see if that works better after

Aitrepreneur

Hi I managed to install it but i get these two errors while launching, it still does launch but im not sure how well it will work with these two errors: Torch reports CUDA not available Package wrong version: huggingface-hub 0.17.3 required 0.15.1

Elad Belleli

no need to change anything inside the setup.bat, findstr is spelled without any capitalization anyway

Aitrepreneur

Figured part of it out. There is a misspelling in the setup.bat for Koyha. “Findstr” should be changed to “FindStr”.

scott bilby

make sure that your antivirus and firewall are disabled before running the installer, for some reason on some machines it blocks the connections and download

Aitrepreneur

New patron here- excited to try the setup, but as soon as it launches, I get this error "Failed to download Visual Studio redistributable installer." very vague. i did go to the security settings for this folder/object and give all of the users full control. still no dice. any ideas? thanks in advance.

scott bilby

for kohya it's linked to your browser's theme, enable dark theme for your browser

Aitrepreneur

running well and going through the steps.... is there a way to set defaut to dark theme?

loughlin john

doesn't work here C:\Users\info\OneDrive\Desktop\KOHYA>"KOHYA SS AUTO INSTALLER.bat" Checking and installing necessary software... Installing Python 3.10.6... Failed to download Python installer. waiting for reply from Aitrepreneur in DM

HT

Go inside the webui-user.bat file and add the argument --port xxxx (where xxxx is the number of the port you want sd to use) on the line set COMMANDLINE_ARGS=

Aitrepreneur

used he installer but want to change the port from 7680 to something else. Where can I do this?

Alex Iannelli

this card only has 8gb of Vram so no you won't be able to train sdxl with that, sd 1.5 probably but not sdxl. You can try using runpod instead if you want to train sdxl

Aitrepreneur

Will it work on RX 6600 XT?

Kamil Wołczek

this step might take some time for some people, make sure you don't have your firewall or antivirus blocking the connection and make sure there isn't a setup window that required attention, otherwise just wait for it to finish installing, if it takes too long, just disable the antivirus and firewall and relaunch again (without admin rights)

Aitrepreneur

after entering choice 2 only this shows and nothing else happens: 22:20:21-557277 INFO Version: v22.0.1 22:20:21-561266 INFO Python 3.10.11 on Windows 22:20:21-569245 INFO nVidia toolkit detected 22:20:21-571240 INFO Installing modules from requirements_windows_torch2.txt... 22:20:21-577224 INFO Installing package: torch==2.0.1+cu118 torchvision==0.15.2+cu118 --index-url https://download.pytorch.org/whl/cu118

spenza kwsx

try to disable your antivirus and firewall for a few minutes, they often blocks the connection and stop the installer

Aitrepreneur

hello, i tried to run the installer but it crashed on me. the odd thing is when i launch it tries to install Python but I am already running python and have been using Auto1111 for a while. Any clue why this would be happening?

Tim Meyer

dm me the full log

Aitrepreneur

make sure that the antivirus and firewall are off when running the installer they often block the files from executing or downloading

Aitrepreneur

Aaron Halevy

Hello! After launching KOHYA SS AUTO INSTALLER.bat a file python-3.10.6-amd64.exe has appeared in the folder and nothing happened after it (the installation window has closed by itself).

Eugenia Mironova

dm me the full log

Aitrepreneur

i get up to this step, any fixes? 2. Torch 2 (recommended) 3. Cancel Enter your choice: 2 20:19:12-403491 INFO Version: v22.0.1 20:19:12-409488 INFO Python 3.10.6 on Windows 20:19:12-416492 INFO nVidia toolkit detected 20:19:12-419488 INFO Installing modules from requirements_windows_torch2.txt... 20:19:12-424492 INFO Installing package: torch==2.0.1+cu118 torchvision==0.15.2+cu118 --index-url https://download.pytorch.org/whl/cu118

Edward Fu

no it should just work, again make sure that the right image folder is selected, otherwise you can just create the folders yourself, it take a few seconds anyway

Aitrepreneur

I am running into an issue trying to make my own LORA. I am following your video but the part where it is supposed to make the folder structure for the LORA, it doesn't do anything. It won't make the folders. I was trying it with Anne Hathaway which should be in the data base. Even when I go through and manually make the folders and copy the hi res images to the 20_anne_hathaway woman folder, kohya still gives an error "image folder not found". Is there a specific location they have to be located?

Jason Martin

Nevermind I figured it out

Chase Hattan

I'm on Windows 10 btw with a 4090 GPU if that helps with recommendation

Chase Hattan

I got an error upon installation regarding my python version I'm on the latest 3.11.3 and I think it requires 3.9 or 3.10. If I downgrade I'm not sure I'll be compatible with other programs I am using. Is there a workaround?

Chase Hattan

should be pretty fast, might depends on your pc of course

Aitrepreneur

How long is the Torch2 install supposed to take? I think the installer keeps freezing there.

Mr.Morning

Thanks, really appreciate it! Much more to come soon ;)

Aitrepreneur

Reason why I decided to join the Patreon. I definitely want to learn and you are doing a great job at teaching. Thanks for making it so easy and for helping so much.

GorillAi

I don't really use linux so I can't really help there

Aitrepreneur

Hi, would you be able to also go over installation in linux (ubuntu 24.04 here)? I keep running into strange issues with kohya_ss that I don't have with automatic1111 or textgen-webui, where it can't find my nvidia 40 series, and the docker stuff doesn't work for me either. Thanks!

edk

hey, no it should be pretty fast, I suppose it could depend on your pc specs, for the dark theme it depends on your browser's theme, just choose a dark mode theme in chrome or edge (or whatever you're using)

Aitrepreneur

Hello, I'm a new Patreon supporter. Thank you for the excellent work you're doing. I've installed Stable diffusion and Kohia using your 'one-click' files. I have two questions: 1. When I try to open the SDXL.json configuration in Kohia, it gets stuck at 'loading config,' unless it's normal for it to take a very long time. 2. How can I apply the dark theme to Kohia? Thanks in advance, and have a great day.

Sébastien

you don't have to do anything, just double click on the installer, make sure your antivirus and firewall are off when you run it some people have issues with theirs

Aitrepreneur

- Clone the Kohya ss Gui repository from GitHub where exactly I have to clone it

Den Karden

It can be installed anywhere you want, the 1-click installer will automatically install it in the folder were you've put it

Aitrepreneur

Happy it helped ;)

Aitrepreneur

THANK YOU, i've been struggling for 4+ hours trying to get it to work, this guide worked.

Melvin De backer

hello , could you include how to choose in wich folder is tshould be installed , i know its a noob question , but dont much about programing yet , come from vfx background

derek honour

i manually installed the 3.10.6, which i use for another program as well so it is installed, and i selected create a path like you said. i just pasted "@echo off if not defined PYTHON (set PYTHON=C:\Users\Blank\AppData\Local\Programs\Python\Python310\python.exe) if not defined VENV_DIR (set "VENV_DIR=%~dp0%venv")" to get it to work which it now does. Kouhya would install but it would just say that the system cannot find the path specified then closes immediately. I think it is finally installing after disabling python in manage app execution aliases

LtCzr

what exactly is your 9009 error? also the installer checks if you have a correct python install, if you don't it will download and install it, also if for some reason the installer just closes for no reason it really is usually a firewall/antivirus issue blocking the file so really make sure there are completely off and not working in the background, for some antivirus it can be really difficult to really turn off

Aitrepreneur

i tried the stable diffusion installer and kept getting the error 9009 error, i eventually just edited it and pasted the path to python=path section and it worked. but For kouhya when I try to install it it just pastes python in the folder then shuts down the cmd install immediately. I have my firewall and virus protection off and have 3.10.6 installed for other applications and placed in environment as well. Not sure what else to do, any suggestions?

LtCzr

yes this is only for installing kohya ss for lora training, the stable diffusion installer is here: https://www.patreon.com/posts/86931758

Aitrepreneur

Just to confirm this does not install stable diffusion correct? It only adds to it so you cant use this installer for both?

LtCzr

ok let me know if it works for you

Aitrepreneur

you can try using this installer I did, but since I don't have a mac I can't promise it will work: https://we.tl/t-YXK7hZostj Open the terminal and navigate to the folder where you put the file then run: chmod +x install_kohya_ss.sh to make the script executable and then run .chmod +x install_kohya_ss.sh to execute the script. Again I haven't tested it myself but try it out

Aitrepreneur

Any plans of doing this for Mac?

Daniel G

Edit: Seems to be solved! I was having the same issue with runpod on nvidia a5000. I got the CUDA memory error and the CalledProcessError: OutOfMemoryError: CUDA out of memory. Tried to allocate 2.00 MiB (GPU 0; 23.68 GiB total capacity; 15.67 GiB already allocated; 1.38 MiB free; 15.80 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF ─────────────────────────────╯ CalledProcessError: Command '['/workspace/kohya_ss/venv/bin/python3', './sdxl_train_network.py', '--enable_bucket', '--min_bucket_reso=256', '--max_bucket_reso=1024', '--pretrained_model_name_or_path=/workspace/stable-diffusion-webui/models/Stable -diffusion/sd_xl_base_1.0_0.9vae.safetensors', '--train_data_dir=/workspace/grayaktrk_alex_wolff/img', '--reg_data_dir=/workspace/grayaktrk_alex_wolff/reg', '--resolution=1024,1024', '--output_dir=/workspace/grayaktrk_alex_wolff/model', '--logging_dir=/workspace/grayaktrk_alex_wolff/log', '--network_alpha=1', '--save_model_as=safetensors', '--network_module=networks.lora', '--text_encoder_lr=0.0003', '--unet_lr=0.0003', '--network_dim=256', '--output_name=GRAYAKTRK_ALEX_WOLFF', '--lr_scheduler_num_cycles=10', '--no_half_vae', '--learning_rate=0.0003', '--lr_scheduler=constant', '--train_batch_size=1', '--max_train_steps=4800', '--save_every_n_epochs=1', '--mixed_precision=bf16', '--save_precision=bf16', '--caption_extension=.txt', '--cache_latents', '--cache_latents_to_disk', '--optimizer_type=Adafactor', '--optimizer_args', 'scale_parameter=False', 'relative_step=False', 'warmup_init=False', '--max_data_loader_n_workers=0', '--bucket_reso_steps=64', '--gradient_checkpointing', '--xformers', '--bucket_no_upscale', '--noise_offset=0.0']' returned non-zero exit status 1. Solution: Lora/Parameters/ Enable Bucket = disabled (Source: https://github.com/bmaltais/kohya_ss/issues/1103) then I got this error: 2023-09-03 16:31:52.568271: I tensorflow/core/util/port.cc:110] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`. 2023-09-03 16:31:52.628066: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags. 2023-09-03 16:31:53.539984: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT 2023-09-03 16:31:58.125243: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT It seemed like it won't work. But after a few minutes, it started creating the model. I hope it will work. I keep you updated.

Gray A.

yes you did a mistake choosing the wrong model it says here (-pretrained_model_name_or_path="runwayml/stable-diffusion-v1-5") that you have chosen the stable diffusion 1.5 not sdxl

Aitrepreneur

Sorry about the long copy/pasta, but I'm really not sure what to do here. I'm not much of a coding guy, but at the bottom it mentions something about Python which I've been having trouble with and the Kohya autoinstaller didn't really work properly. I do know that all the setting in the Kohya gui are correct though and I followed the tutorial video all the way to pressing the Start Training button. Anyways, any help with this would be appreciated. 15:41:48-588794 INFO Version: v21.8.8 15:41:48-593795 INFO nVidia toolkit detected 15:41:50-475221 INFO Torch 2.0.1+cu118 15:41:50-507228 INFO Torch backend: nVidia CUDA 11.8 cuDNN 8700 15:41:50-509228 INFO Torch detected GPU: NVIDIA GeForce RTX 4090 VRAM 24563 Arch (8, 9) Cores 128 15:41:50-511230 INFO Verifying modules instalation status from requirements_windows_torch2.txt... 15:41:50-513229 INFO Verifying modules instalation status from requirements.txt... 15:41:53-940006 INFO headless: False 15:41:53-943007 INFO Load CSS... Running on local URL: http://127.0.0.1:7860 To create a public link, set `share=True` in `launch()`. 15:42:02-703999 INFO Start training LoRA Standard ... 15:42:02-704999 INFO Checking for duplicate image filenames in training data directory... 15:42:02-706000 INFO Valid image folder names found in: C:/Users/JR/Pictures/Aitrepreneur SDXL Regularization Images/Llama\img 15:42:02-707000 INFO Valid image folder names found in: C:/Users/JR/Pictures/Aitrepreneur SDXL Regularization Images/Llama\reg 15:42:02-709000 INFO Folder 20_Sarah Bolger woman: 25 images found 15:42:02-710000 INFO Folder 20_Sarah Bolger woman: 500 steps 15:42:02-710000 WARNING Regularisation images are used... Will double the number of steps required... 15:42:02-711001 INFO Total steps: 500 15:42:02-712001 INFO Train batch size: 1 15:42:02-712001 INFO Gradient accumulation steps: 1 15:42:02-713001 INFO Epoch: 10 15:42:02-714001 INFO Regulatization factor: 2 15:42:02-714001 INFO max_train_steps (500 / 1 / 1 * 10 * 2) = 10000 15:42:02-715001 INFO stop_text_encoder_training = 0 15:42:02-716001 INFO lr_warmup_steps = 0 15:42:02-717001 INFO Saving training config to C:/Users/JR/Pictures/Aitrepreneur SDXL Regularization Images/Llama\model\Llama-Sarah_Bolger_20230902-154202.json... 15:42:02-719002 INFO accelerate launch --num_cpu_threads_per_process=2 "./sdxl_train_network.py" --enable_bucket --min_bucket_reso=256 --max_bucket_reso=2048 --pretrained_model_name_or_path="runwayml/stable-diffusion-v1-5" --train_data_dir="C:/Users/JR/Pictures/Aitrepreneur SDXL Regularization Images/Llama\img" --reg_data_dir="C:/Users/JR/Pictures/Aitrepreneur SDXL Regularization Images/Llama\reg" --resolution="1024,1024" --output_dir="C:/Users/JR/Pictures/Aitrepreneur SDXL Regularization Images/Llama\model" --logging_dir="C:/Users/JR/Pictures/Aitrepreneur SDXL Regularization Images/Llama\log" --network_alpha="1" --save_model_as=safetensors --network_module=networks.lora --text_encoder_lr=0.0003 --unet_lr=0.0003 --network_dim=256 --output_name="Llama-Sarah_Bolger" --lr_scheduler_num_cycles="10" --no_half_vae --learning_rate="0.0003" --lr_scheduler="constant" --train_batch_size="1" --max_train_steps="10000" --save_every_n_epochs="1" --mixed_precision="bf16" --save_precision="bf16" --caption_extension=".txt" --cache_latents --cache_latents_to_disk --optimizer_type="Adafactor" --optimizer_args scale_parameter=False relative_step=False warmup_init=False --max_data_loader_n_workers="0" --bucket_reso_steps=64 --gradient_checkpointing --xformers --bucket_no_upscale --noise_offset=0.0 [15:42:09] WARNING The following values were not passed to `accelerate launch` and had defaults used launch.py:890 instead: `--num_processes` was set to a value of `1` `--num_machines` was set to a value of `1` `--mixed_precision` was set to a value of `'no'` `--dynamo_backend` was set to a value of `'no'` To avoid this warning pass in values for each of the problematic parameters or run `accelerate config`. A matching Triton is not available, some optimizations will not be enabled. Error caught was: No module named 'triton' prepare tokenizers Using DreamBooth method. prepare images. found directory C:\Users\JR\Pictures\Aitrepreneur SDXL Regularization Images\Llama\img\20_Sarah Bolger woman contains 25 image files found directory C:\Users\JR\Pictures\Aitrepreneur SDXL Regularization Images\Llama\reg\1_woman contains 1000 image files No caption file found for 1000 images. Training will continue without captions for these images. If class token exists, it will be used. / 1000枚の画像にキャプションファイルが見つかりませんでした。これらの画像についてはキャプションなしで学 習を続行します。class tokenが存在する場合はそれを使います。 C:\Users\JR\Pictures\Aitrepreneur SDXL Regularization Images\Llama\reg\1_woman\woman_0001.jpg C:\Users\JR\Pictures\Aitrepreneur SDXL Regularization Images\Llama\reg\1_woman\woman_0002.jpg C:\Users\JR\Pictures\Aitrepreneur SDXL Regularization Images\Llama\reg\1_woman\woman_0003.jpg C:\Users\JR\Pictures\Aitrepreneur SDXL Regularization Images\Llama\reg\1_woman\woman_0004.jpg C:\Users\JR\Pictures\Aitrepreneur SDXL Regularization Images\Llama\reg\1_woman\woman_0005.jpg C:\Users\JR\Pictures\Aitrepreneur SDXL Regularization Images\Llama\reg\1_woman\woman_0006.jpg... and 995 more 500 train images with repeating. 1000 reg images. some of reg images are not used / 正則化画像の数が多いので、一部使用されない正則化画像があります [Dataset 0] batch_size: 1 resolution: (1024, 1024) enable_bucket: True min_bucket_reso: 256 max_bucket_reso: 2048 bucket_reso_steps: 64 bucket_no_upscale: True [Subset 0 of Dataset 0] image_dir: "C:\Users\JR\Pictures\Aitrepreneur SDXL Regularization Images\Llama\img\20_Sarah Bolger woman" image_count: 25 num_repeats: 20 shuffle_caption: False keep_tokens: 0 caption_dropout_rate: 0.0 caption_dropout_every_n_epoches: 0 caption_tag_dropout_rate: 0.0 color_aug: False flip_aug: False face_crop_aug_range: None random_crop: False token_warmup_min: 1, token_warmup_step: 0, is_reg: False class_tokens: Sarah Bolger woman caption_extension: .txt [Subset 1 of Dataset 0] image_dir: "C:\Users\JR\Pictures\Aitrepreneur SDXL Regularization Images\Llama\reg\1_woman" image_count: 1000 num_repeats: 1 shuffle_caption: False keep_tokens: 0 caption_dropout_rate: 0.0 caption_dropout_every_n_epoches: 0 caption_tag_dropout_rate: 0.0 color_aug: False flip_aug: False face_crop_aug_range: None random_crop: False token_warmup_min: 1, token_warmup_step: 0, is_reg: True class_tokens: woman caption_extension: .txt [Dataset 0] loading image sizes. 100%|██████████████████████████████████████████████████████████████████████████████| 525/525 [00:00<00:00, 1521.40it/s] make buckets min_bucket_reso and max_bucket_reso are ignored if bucket_no_upscale is set, because bucket reso is defined by image size automatically / bucket_no_upscaleが指定された場合は、bucketの解像度は画像サイズから自動計算されるため、min_bucket_resoとmax_bucket_resoは無視されます number of images (including repeats) / 各bucketの画像枚数(繰り返し回数を含む) bucket 0: resolution (704, 1344), count: 40 bucket 1: resolution (768, 1216), count: 20 bucket 2: resolution (768, 1344), count: 60 bucket 3: resolution (832, 1088), count: 20 bucket 4: resolution (960, 960), count: 20 bucket 5: resolution (1024, 1024), count: 500 bucket 6: resolution (1088, 832), count: 260 bucket 7: resolution (1344, 768), count: 80 mean ar error (without repeats): 0.001004468332028807 preparing accelerator loading model for process 0/1 load Diffusers pretrained models: runwayml/stable-diffusion-v1-5, variant=None unet\diffusion_pytorch_model.safetensors not found ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ C:\Users\JR\Desktop\SDA1111MANUAL\Kohya\kohya_ss\sdxl_train_network.py:176 in │ │ │ │ 173 │ args = train_util.read_config_from_file(args, parser) │ │ 174 │ │ │ 175 │ trainer = SdxlNetworkTrainer() │ │ ❱ 176 │ trainer.train(args) │ │ 177 │ │ │ │ C:\Users\JR\Desktop\SDA1111MANUAL\Kohya\kohya_ss\train_network.py:214 in train │ │ │ │ 211 │ │ vae_dtype = torch.float32 if args.no_half_vae else weight_dtype │ │ 212 │ │ │ │ 213 │ │ # モデルを読み込む │ │ ❱ 214 │ │ model_version, text_encoder, vae, unet = self.load_target_model(args, weight_dty │ │ 215 │ │ │ │ 216 │ │ # text_encoder is List[CLIPTextModel] or CLIPTextModel │ │ 217 │ │ text_encoders = text_encoder if isinstance(text_encoder, list) else [text_encode │ │ │ │ C:\Users\JR\Desktop\SDA1111MANUAL\Kohya\kohya_ss\sdxl_train_network.py:37 in load_target_model │ │ │ │ 34 │ │ │ unet, │ │ 35 │ │ │ logit_scale, │ │ 36 │ │ │ ckpt_info, │ │ ❱ 37 │ │ ) = sdxl_train_util.load_target_model(args, accelerator, sdxl_model_util.MODEL_V │ │ 38 │ │ │ │ 39 │ │ self.load_stable_diffusion_format = load_stable_diffusion_format │ │ 40 │ │ self.logit_scale = logit_scale │ │ │ │ C:\Users\JR\Desktop\SDA1111MANUAL\Kohya\kohya_ss\library\sdxl_train_util.py:33 in │ │ load_target_model │ │ │ │ 30 │ │ │ │ unet, │ │ 31 │ │ │ │ logit_scale, │ │ 32 │ │ │ │ ckpt_info, │ │ ❱ 33 │ │ │ ) = _load_target_model( │ │ 34 │ │ │ │ args.pretrained_model_name_or_path, │ │ 35 │ │ │ │ args.vae, │ │ 36 │ │ │ │ model_version, │ │ │ │ C:\Users\JR\Desktop\SDA1111MANUAL\Kohya\kohya_ss\library\sdxl_train_util.py:79 in │ │ _load_target_model │ │ │ │ 76 │ │ print(f"load Diffusers pretrained models: {name_or_path}, variant={variant}") │ │ 77 │ │ try: │ │ 78 │ │ │ try: │ │ ❱ 79 │ │ │ │ pipe = StableDiffusionXLPipeline.from_pretrained( │ │ 80 │ │ │ │ │ name_or_path, torch_dtype=weight_dtype, variant=variant, tokenizer=N │ │ 81 │ │ │ │ ) │ │ 82 │ │ │ except EnvironmentError as ex: │ │ │ │ C:\Users\JR\Desktop\SDA1111MANUAL\Kohya\kohya_ss\venv\Lib\site-packages\diffusers\pipelines\pipe │ │ line_utils.py:1070 in from_pretrained │ │ │ │ 1067 │ │ │ │ init_kwargs[module] = passed_class_obj.get(module, None) │ │ 1068 │ │ elif len(missing_modules) > 0: │ │ 1069 │ │ │ passed_modules = set(list(init_kwargs.keys()) + list(passed_class_obj.keys() │ │ ❱ 1070 │ │ │ raise ValueError( │ │ 1071 │ │ │ │ f"Pipeline {pipeline_class} expected {expected_modules}, but only {passe │ │ 1072 │ │ │ ) │ │ 1073 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ValueError: Pipeline expected {'text_encoder', 'unet', 'tokenizer_2', 'vae', 'text_encoder_2', 'scheduler', 'tokenizer'}, but only {'text_encoder', 'vae', 'scheduler', 'unet', 'tokenizer'} were passed. ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ in _run_module_as_main:198 │ │ in _run_code:88 │ │ │ │ in :7 │ │ │ │ 4 from accelerate.commands.accelerate_cli import main │ │ 5 if __name__ == '__main__': │ │ 6 │ sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) │ │ ❱ 7 │ sys.exit(main()) │ │ 8 │ │ │ │ C:\Users\JR\Desktop\SDA1111MANUAL\Kohya\kohya_ss\venv\Lib\site-packages\accelerate\commands\acce │ │ lerate_cli.py:45 in main │ │ │ │ 42 │ │ exit(1) │ │ 43 │ │ │ 44 │ # Run │ │ ❱ 45 │ args.func(args) │ │ 46 │ │ 47 │ │ 48 if __name__ == "__main__": │ │ │ │ C:\Users\JR\Desktop\SDA1111MANUAL\Kohya\kohya_ss\venv\Lib\site-packages\accelerate\commands\laun │ │ ch.py:918 in launch_command │ │ │ │ 915 │ elif defaults is not None and defaults.compute_environment == ComputeEnvironment.AMA │ │ 916 │ │ sagemaker_launcher(defaults, args) │ │ 917 │ else: │ │ ❱ 918 │ │ simple_launcher(args) │ │ 919 │ │ 920 │ │ 921 def main(): │ │ │ │ C:\Users\JR\Desktop\SDA1111MANUAL\Kohya\kohya_ss\venv\Lib\site-packages\accelerate\commands\laun │ │ ch.py:580 in simple_launcher │ │ │ │ 577 │ process.wait() │ │ 578 │ if process.returncode != 0: │ │ 579 │ │ if not args.quiet: │ │ ❱ 580 │ │ │ raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd) │ │ 581 │ │ else: │ │ 582 │ │ │ sys.exit(1) │ │ 583 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ CalledProcessError: Command '['C:\\Users\\JR\\Desktop\\SDA1111MANUAL\\Kohya\\kohya_ss\\venv\\Scripts\\python.exe', './sdxl_train_network.py', '--enable_bucket', '--min_bucket_reso=256', '--max_bucket_reso=2048', '--pretrained_model_name_or_path=runwayml/stable-diffusion-v1-5', '--train_data_dir=C:/Users/JR/Pictures/Aitrepreneur SDXL Regularization Images/Llama\\img', '--reg_data_dir=C:/Users/JR/Pictures/Aitrepreneur SDXL Regularization Images/Llama\\reg', '--resolution=1024,1024', '--output_dir=C:/Users/JR/Pictures/Aitrepreneur SDXL Regularization Images/Llama\\model', '--logging_dir=C:/Users/JR/Pictures/Aitrepreneur SDXL Regularization Images/Llama\\log', '--network_alpha=1', '--save_model_as=safetensors', '--network_module=networks.lora', '--text_encoder_lr=0.0003', '--unet_lr=0.0003', '--network_dim=256', '--output_name=Llama-Sarah_Bolger', '--lr_scheduler_num_cycles=10', '--no_half_vae', '--learning_rate=0.0003', '--lr_scheduler=constant', '--train_batch_size=1', '--max_train_steps=10000', '--save_every_n_epochs=1', '--mixed_precision=bf16', '--save_precision=bf16', '--caption_extension=.txt', '--cache_latents', '--cache_latents_to_disk', '--optimizer_type=Adafactor', '--optimizer_args', 'scale_parameter=False', 'relative_step=False', 'warmup_init=False', '--max_data_loader_n_workers=0', '--bucket_reso_steps=64', '--gradient_checkpointing', '--xformers', '--bucket_no_upscale', '--noise_offset=0.0']' returned non-zero exit status 1.

Jean-Roch McGraw

you need to use a lower network rank if you want smaller lora size, something like 32 should be ok. if you already have a lora you can resize it inside kohya, go to utilities, lora, resize lora and chose a new network rank for your lora, it will automatically resize it

Aitrepreneur

is there a reason my loras are 1.7gb, they will not work with warpfusion at this size. Im trying desperately to get the likeness of my son for a hype video. any help would be greatly appreciated

HOOD GAMER

I keep gettting this error Error running pip: install --upgrade torch==2.0.1+cu118 torchvision==0.15.2+cu118 --index-url https://download.pytorch.org/whl/cu118

You're A Cunt

learned! thank you very much

javi de la chica

hi, it's installed in the same folder where you put the 1-click installer

Aitrepreneur

hi!! I am unable to figure out where the folders are being installed

javi de la chica

I need to make a time to try this. Thank you!

Rai T00n

mine too, some package wont install either

Tomas Quintero

Hi again, it's fixed! I didn't see the part when you say we should use the SDXL - LOWVRAM preset for 12GB of ram. :)

William Vercken de Vreuschmen

Hi! I don't understand something : I have hundreeeeds hours of training ! I followed your tutorial, used your preset and with 30 images it says it will take more than 400 hours. So I reduce the number of images to 15 and did a Train batch size of 4, but now it's still at more than 100 hours. I have a pretty good PC : - CPU: Intel Core i7-13700K - Graphic Card: RTX 4070 12 GB - Memory: Corsair Vengeance 32 GB - Storage: 2 x 4To SSD I saw on youtube comments that I'm not the only one, but I don't know what I can do/try... Thank you for your help and your work!

William Vercken de Vreuschmen

double click the gui.bat file inside the kohya folder

Aitrepreneur

Ok after the Install sequence is over how do I open up the gui?

Lev Israel

Kohya buttons not working on mac. I thought it was because needed the configuration file, then I subscribed for you patreon to download the files but the open button doesn't work at all... I tried some solutions from Reddit but the venv folder doesn't contain the Scripts folder. How do I fix it?

Gustavo Marques

Hi and thanks. I create my own lora satisfactorily. I have an rtx 3060, 12 vram 64 ram ryzen 9 win 11. I don't know why the process was calculated in 169 hours. At 37 hours my computer reset, but I had created a safetensor from the first epoch, I tried it and I was satisfied. Is there any way to improve it locally without waiting 169 hours?

Fabio Martich

The batch does not work for me... it downloads Python, but does not install and and then just quits... not really 1 click... After installing Python manually here is the readout from setu_windows.py 1. Torch 1 (legacy, no longer supported. Will be removed in v21.9.x) 2. Torch 2 (recommended) 3. Cancel Enter your choice: 2 21:26:12-455492 INFO Version: v21.8.7 21:26:12-464090 INFO Python 3.11.4 on Windows 21:26:12-465091 ERROR Incompatible Python version: 3.11.4 required 3.[9, 10] 21:26:12-475490 INFO Using CPU-only Torch 21:26:12-477738 INFO Installing modules from requirements_windows_torch2.txt... 21:26:12-482753 INFO Installing package: torch==2.0.1+cu118 torchvision==0.15.2+cu118 --index-url https://download.pytorch.org/whl/cu118 21:26:39-585054 ERROR Error running pip: install --upgrade torch==2.0.1+cu118 torchvision==0.15.2+cu118 --index-url https://download.pytorch.org/whl/cu118 21:26:39-588347 INFO Installing package: xformers==0.0.20 21:27:49-722358 ERROR Error running pip: install --upgrade xformers==0.0.20 21:28:13-691639 INFO Installing package: bitsandbytes==0.35.0 21:28:37-967882 ERROR Error running pip: install --upgrade bitsandbytes==0.35.0 21:28:37-968883 INFO Installing package: tensorboard==2.12.3 tensorflow==2.12.0 21:28:58-265341 ERROR Error running pip: install --upgrade tensorboard==2.12.3 tensorflow==2.12.0 21:28:58-267342 INFO Installing modules from requirements.txt... 21:28:58-269617 INFO Installing package: accelerate==0.19.0 21:29:54-786328 INFO Installing package: altair==4.2.2 21:30:28-357746 INFO Installing package: dadaptation==3.1 21:30:34-996835 INFO Installing package: diffusers[torch]==0.18.2 21:30:44-422411 INFO Installing package: easygui==0.98.3 21:30:45-849025 INFO Installing package: einops==0.6.0 21:30:47-202318 INFO Installing package: fairscale==0.4.13 21:30:57-191493 INFO Installing package: ftfy==6.1.1 21:30:58-742618 INFO Installing package: gradio==3.36.1 21:31:25-848955 INFO Installing package: huggingface-hub==0.15.1 21:31:28-180377 INFO Installing package: lion-pytorch==0.0.6 21:31:29-862391 INFO Installing package: lycoris_lora==1.8.3 21:31:52-397701 INFO Installing package: invisible-watermark==0.2.0 21:31:56-494545 INFO Installing package: open-clip-torch==2.20.0 21:32:04-486272 INFO Installing package: opencv-python==4.7.0.68 21:32:09-485605 INFO Installing package: prodigyopt==1.0 21:32:11-348815 INFO Installing package: pytorch-lightning==1.9.0 21:32:18-679464 INFO Installing package: rich==13.4.1 21:32:21-518974 INFO Installing package: safetensors==0.3.1 21:32:23-675925 INFO Installing package: timm==0.6.12 21:32:27-861997 INFO Installing package: tk==0.1.0 21:32:29-842302 INFO Installing package: toml==0.10.2 21:32:31-861379 INFO Installing package: transformers==4.30.2 21:32:48-052454 INFO Installing package: voluptuous==0.13.1 21:32:50-086405 INFO Installing package: wandb==0.15.0

AtlasRand Gaming

EDIT: I choose one of the first generations GPUs and it fixed it! ¿can i change any parameter to make it faster if for example i select a bigger GPU than 24gb?

Ivan Galucho

hi! i get: "2023-08-17T05:18:59Z create container ashleykza/stable-diffusion-webui:1.8.0 2023-08-17T05:18:59Z image pull is throttled" on runpod template, and keeps looping the same log

Ivan Galucho

no it's an bug in the webui, I have that bug too each time I launch auto1111, what I do is just generate a random image with random words in the prompt at 512x512 resolution and then I can start generating images again, it's annoying but it's a small bug that can be quickly "fixed"

Aitrepreneur

Hello, new Patreon supporter here. I was hoping you can help; I've tried to google a fix, but no. I trained a model on 40 of my 4kx4k artwork images; it created the model successfully, it was 1.7Gb. I tried to load it and generate an image and got this error: NansException: A tensor with all NaNs was produced in Unet. This could be either because there's not enough precision to represent the picture, or because your video card does not support half type. Try setting the "Upcast cross attention layer to float32" option in Settings > Stable Diffusion or using the --no-half commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check. I was wondering, since my art is abstract, if it's an issue with the actual images, or if I'm missing something. I did go and try to set the float32 under settings but it still threw the error. RTX 3090 and 3080, Ryzen 3950 16 core, 64gb ram, windows 10. Thank you for all you do, really want to make a model based on my work.

Cody Rutty

need a bit more info here, pc specs?

Aitrepreneur

that's a lot of images, depending on what you are trying to train, if you have this much images I suggest increasing the batch size otherwise it will take days for the full training to finish

Aitrepreneur

I think there is already a google colab for that: https://colab.research.google.com/github/camenduru/kohya_ss-colab/blob/main/kohya_ss_colab.ipynb but I cannot promise it will work for SDXL training though

Aitrepreneur

hmm weird, could be a network or firewall issue. Maybe try this version instead: https://we.tl/t-af8fdkqRzl

Aitrepreneur

After that error I had it wouldn't install, and now when I go to generate any image on the webui it now comes up with this error AttributeError: 'NoneType' object has no attribute 'to'

Mark

I got it to work!!! Wooo! Thank you!!! I feel I don't quite understand how to get the proper setting based on the number of images I use. I used the basic settings in the sdxl.json file you provided and I had 78 photographs with a wide variety. It ended up with a total of 28800 steps. When I woke up in the morning it was not done but it did create 3 models. I stopped the process and checked the models. The first one was amazing but the last 2 were way over trained. I am glad I got stopped the training process. It would have taken forever and not have seen more benefit. Is there a general ratio of settings I should have based on the number of photos I use? I am running a 4070ti on my computer now.

CGI Nerd

Hello, I would be super grateful if you could explain how to install on google colab, thanks

Stefano Francaviglia

i launch the .bat file and it just comes up with this Checking and installing necessary software... Installing Python 3.10.6... Writing web request Writing request stream... (Number of bytes written: 11740944) and keeps going up a higher number then it just quits? i dont know what the issue is :/

Mark

wow seems like a lot is going on here if even the installer is not even launching anymore.... try first to uninstall python completely and then relaunch the installer it will install the right version of python automatically, could also be an issue with your entire system too difficult to say in a situation like that

Aitrepreneur

Haha thank you, glad you like it ;)

Aitrepreneur

This happened for me as well.

Ian Brumley

So I ran the installer and it failed. Here's what I did and what happened: Enter choice 1, enter choice 2, then among the install there are two errors. first reads something about not having the right Python version, it looks like it's recommending an older version of python then I've got, which doesn't make a lot of sense to me. The second error is something about pip. Anyway, after awhile it goes back to the first question (the one where you're supposed to answer "Install kohya_ss gui") Since then, I have not been able to run the installer, it just crashes as soon as it's clicked on and I can't even get a glimpse of an error report. I've tried everything I can think of, from restarting my PC to installing an older version of Python. What should I do?

Hadriex

K, thanks so much for this awesome tool. It really was 1-click which is a godsend since I have a new computer and have been installing AI programs like crazy lately. Quick question tho, the second batch of questions that appear after installing Koya - where you're asked if you're running a local GPU and are asked if you want to use FP16 or BF16 - these questions did not appear for me. Is there a way for me to make sure these setting are correct me?

Black Swan

Amigo! Thanks so much for this, as soon as I get more work, I will support you more! Love your videos! Keep up the good work and don't let anything get you down! Let's make millions together!

JoeyDotDigitize

Thank you! I really appreciate that :)

Aitrepreneur

Just wanted to say thanks for your efforts and the excellent work you do to make your instructional videos. You have gained a supporter because of it.

Darren Chapman

It breaks less often

Aitrepreneur

What's the difference with the train tab in automatic1111?

MetaSamsara

I appreciate it ;)

Aitrepreneur

Wow! That’s a lot of tools! Thank you so much for all you do and all your amazing videos!!

fuzzyghosts


Related Creators