bmaltais / kohya_ss

Apache License 2.0
9.53k stars 1.23k forks source link

Installation not working #157

Closed beegchangoose closed 1 year ago

beegchangoose commented 1 year ago

CPU: Ryzen 5 2600 GPU: RTX 3060 Python v: 3.10.7

I'm trying to install it on a separate SSD

I've done everything that is required before the installation, when pasting the installation script into powershell and executing it I get the following errors:

Collecting xformers@ https://github.com/C43H66N12O12S2/stable-diffusion-webui/releases/download/f/xformers-0.0.14.dev0-cp310-cp310-win_amd64.whl
  Downloading https://github.com/C43H66N12O12S2/stable-diffusion-webui/releases/download/f/xformers-0.0.14.dev0-cp310-cp310-win_amd64.whl (184.3 MB)
     ---------------------------------------- 184.3/184.3 MB 2.9 MB/s eta 0:00:00
Processing m:\kohya\kohya_ss
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting accelerate==0.15.0
  Using cached accelerate-0.15.0-py3-none-any.whl (191 kB)
Collecting transformers==4.26.0
  Using cached transformers-4.26.0-py3-none-any.whl (6.3 MB)
Collecting ftfy==6.1.1
  Using cached ftfy-6.1.1-py3-none-any.whl (53 kB)
Collecting albumentations==1.3.0
  Using cached albumentations-1.3.0-py3-none-any.whl (123 kB)
Collecting opencv-python==4.7.0.68
  Using cached opencv_python-4.7.0.68-cp37-abi3-win_amd64.whl (38.2 MB)
Collecting einops==0.6.0
  Using cached einops-0.6.0-py3-none-any.whl (41 kB)
Collecting diffusers[torch]==0.10.2
  Using cached diffusers-0.10.2-py3-none-any.whl (503 kB)
Collecting pytorch-lightning==1.9.0
  Using cached pytorch_lightning-1.9.0-py3-none-any.whl (825 kB)
Collecting bitsandbytes==0.35.0
  Using cached bitsandbytes-0.35.0-py3-none-any.whl (62.5 MB)
Collecting tensorboard==2.10.1
  Using cached tensorboard-2.10.1-py3-none-any.whl (5.9 MB)
Collecting safetensors==0.2.6
  Using cached safetensors-0.2.6-cp310-cp310-win_amd64.whl (268 kB)
Collecting gradio==3.16.2
  Using cached gradio-3.16.2-py3-none-any.whl (14.2 MB)
Collecting altair==4.2.2
  Using cached altair-4.2.2-py3-none-any.whl (813 kB)
Collecting easygui==0.98.3
  Using cached easygui-0.98.3-py2.py3-none-any.whl (92 kB)
Collecting tk==0.1.0
  Using cached tk-0.1.0-py3-none-any.whl (3.9 kB)
Requirement already satisfied: requests==2.28.2 in m:\kohya\kohya_ss\venv\lib\site-packages (from -r requirements.txt (line 17)) (2.28.2)
Collecting timm==0.6.12
  Using cached timm-0.6.12-py3-none-any.whl (549 kB)
Collecting fairscale==0.4.13
  Using cached fairscale-0.4.13-py3-none-any.whl

ERROR: Wheel 'fairscale' located at C:\users\33zom\appdata\local\pip\cache\wheels\78\a4\c0\fb0a7ef03cff161611c3fa40c6cf898f76e58ec421b88e8cb3\fairscale-0.4.13-py3-none-any.whl is invalid.

[notice] A new release of pip available: 22.2.2 -> 23.0
[notice] To update, run: python.exe -m pip install --upgrade pip
Collecting xformers==0.0.14.dev0
   Downloading https://github.com/C43H66N12O12S2/stable-diffusion-webui/releases/download/f/xformers-0.0.14.dev0-cp310-cp310-win_amd64.whl (184.3 MB)
      ------------------------------------------------------ 184.3/184.3 MB 2.9 MB/s eta 0 :00:00
Installing collected packages: xformers
Successfully installed xformers-0.0.14.dev0

[notice] A new release of pip available: 22.2.2 -> 23.0
[notice] To update, run: python.exe -m pip install --upgrade pip
cp : The filename, directory name, or volume label syntax is incorrect.
In line:11 characters:1
+ cp .\bitsandbytes_windows\*.dll .\venv\Lib\site-packages\bitsandbytes ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo : NotSpecified: (:) [Copy-Item], IOException
     + FullyQualifiedErrorId : System.IO.IOException,Microsoft.PowerShell.Commands.CopyItemCommand

cp : Could not find part of the path "M:\Kohya\kohya_ss\venv\Lib\site-packages\bitsandbytes\cextension.py".
become.
In line:12 characters:1
+ cp .\bitsandbytes_windows\cextension.py .\venv\Lib\site-packages\bits ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo : NotSpecified: (:) [Copy-Item], DirectoryNotFoundException
     + FullyQualifiedErrorId : System.IO.DirectoryNotFoundException,Microsoft.PowerShell.Commands.CopyItemCommand

cp : A part of the path "M:\Kohya\kohya_ss\venv\Lib\site-packages\bitsandbytes\cuda_setup\main.py" failed
being found.
In line:13 characters:1
+ cp .\bitsandbytes_windows\main.py .\venv\Lib\site-packages\bitsandbyt ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo : NotSpecified: (:) [Copy-Item], DirectoryNotFoundException
     + FullyQualifiedErrorId : System.IO.DirectoryNotFoundException,Microsoft.PowerShell.Commands.CopyItemCommand

accelerate : The term "accelerate" was not used as the name of a cmdlet, function, script file, or
of an executable program. Check the spelling of the name or if the path is correct (if
included) and repeat the process.
In line:15 characters:1
+ accelerate config
+ ~~~~~~~~~~
     + CategoryInfo : ObjectNotFound: (accelerate:String) [], CommandNotFoundException
     + FullyQualifiedErrorId : CommandNotFoundException

Any Idea on how to fix that?

beegchangoose commented 1 year ago

I tried reinstalling bitsandbytes using pip install bitsandbytes in the venv, but after running the gui.bat file I get:

Traceback (most recent call last):
  File "M:\Kohya\kohya_ss\kohya_gui.py", line 1, in <module>
    import gradio as gr
ModuleNotFoundError: No module named 'gradio'
beegchangoose commented 1 year ago

Fixed it by upgrading python to 3.10.9, wow.

The readme.md is currently saying just 3.10, I'd recommend changing it to 3.10.9

@bmaltais @bernardmaltais