kohya_ss icon indicating copy to clipboard operation
kohya_ss copied to clipboard

Can't launch gui.bat

Open TurnipLove opened this issue 2 years ago • 5 comments

When I try to launch Gui.bat I get this error,

Traceback (most recent call last): File "R:\StableDiffusion\Kohya\kohya_ss\kohya_gui.py", line 1, in import gradio as gr ModuleNotFoundError: No module named 'gradio' Press any key to continue . . .

I have tried pip install gradio, and i get a list of requirements already satisfied. Not sure where to go from here. Any ideas? ty

TurnipLove avatar Feb 19 '23 12:02 TurnipLove

Try re doing the main commandline copy paste

git clone https://github.com/bmaltais/kohya_ss.git cd kohya_ss

python -m venv venv .\venv\Scripts\activate

pip install torch==1.12.1+cu116 torchvision==0.13.1+cu116 --extra-index-url https://download.pytorch.org/whl/cu116 pip install --use-pep517 --upgrade -r requirements.txt pip install -U -I --no-deps https://github.com/C43H66N12O12S2/stable-diffusion-webui/releases/download/f/xformers-0.0.14.dev0-cp310-cp310-win_amd64.whl

cp .\bitsandbytes_windows*.dll .\venv\Lib\site-packages\bitsandbytes
cp .\bitsandbytes_windows\cextension.py .\venv\Lib\site-packages\bitsandbytes\cextension.py cp .\bitsandbytes_windows\main.py .\venv\Lib\site-packages\bitsandbytes\cuda_setup\main.py

accelerate config

And for accelarate config, select the right options

Ihateyoudattebayo avatar Feb 19 '23 23:02 Ihateyoudattebayo

Try re doing the main commandline copy paste

git clone https://github.com/bmaltais/kohya_ss.git cd kohya_ss

python -m venv venv .\venv\Scripts\activate

pip install torch==1.12.1+cu116 torchvision==0.13.1+cu116 --extra-index-url https://download.pytorch.org/whl/cu116 pip install --use-pep517 --upgrade -r requirements.txt pip install -U -I --no-deps https://github.com/C43H66N12O12S2/stable-diffusion-webui/releases/download/f/xformers-0.0.14.dev0-cp310-cp310-win_amd64.whl

cp .\bitsandbytes_windows*.dll .\venv\Lib\site-packages\bitsandbytes cp .\bitsandbytes_windows\cextension.py .\venv\Lib\site-packages\bitsandbytes\cextension.py cp .\bitsandbytes_windows\main.py .\venv\Lib\site-packages\bitsandbytes\cuda_setup\main.py

accelerate config

And for accelarate config, select the right options

this works if the python eviroment is called venv. But what about if it is call with some other name?. I guess editing gui.ps1, upgrade.ps1 and gui.bat and changing venv for another name enviroment would be enough.

vivi-gomez avatar Feb 22 '23 12:02 vivi-gomez

Try re doing the main commandline copy paste git clone https://github.com/bmaltais/kohya_ss.git cd kohya_ss python -m venv venv .\venv\Scripts\activate pip install torch==1.12.1+cu116 torchvision==0.13.1+cu116 --extra-index-url https://download.pytorch.org/whl/cu116 pip install --use-pep517 --upgrade -r requirements.txt pip install -U -I --no-deps https://github.com/C43H66N12O12S2/stable-diffusion-webui/releases/download/f/xformers-0.0.14.dev0-cp310-cp310-win_amd64.whl cp .\bitsandbytes_windows*.dll .\venv\Lib\site-packages\bitsandbytes cp .\bitsandbytes_windows\cextension.py .\venv\Lib\site-packages\bitsandbytes\cextension.py cp .\bitsandbytes_windows\main.py .\venv\Lib\site-packages\bitsandbytes\cuda_setup\main.py accelerate config And for accelarate config, select the right options

this works if the python eviroment is called venv. But what about if it is call with some other name?. I guess editing gui.ps1, upgrade.ps1 and gui.bat and changing venv for another name enviroment would be enough.

did you copy paste exactly????

If not, then rename the venv to the environment name

Ihateyoudattebayo avatar Feb 22 '23 16:02 Ihateyoudattebayo

I had a similar problem and this worked for me. "Make sure to tick the box to add Python to the 'PATH' environment variable" How to do it: https://www.youtube.com/watch?v=ow2jROvxyH4&t=6s

filipaura avatar Feb 24 '23 12:02 filipaura

I had a similar problem and this worked for me. "Make sure to tick the box to add Python to the 'PATH' environment variable" How to do it: https://www.youtube.com/watch?v=ow2jROvxyH4&t=6s

I added it to system variable, nothing fixed

koopa990 avatar Feb 26 '23 17:02 koopa990