bmaltais / kohya_ss

Apache License 2.0
9.53k stars 1.23k forks source link

Could not find a version that satisfies the requirement #92

Closed DivinoAG closed 1 year ago

DivinoAG commented 1 year ago

Hello,

I'm trying to follow the installation steps, and I have already verified that I have the correct dependancies.

When using the Set-ExecutionPolicy Unrestricted I didn't get a any messages, the command just executed silently. Using the Get-ExecutionPolicy -List gives me the following:

        ----- ---------------
MachinePolicy       Undefined
   UserPolicy       Undefined
      Process       Undefined
  CurrentUser    Unrestricted
 LocalMachine    Unrestricted

So, to get to the point: when I try to run the command block for installation, I'm getting some messages saying Could not find a version that satisfies the requirement about most of the installation steps.

(venv) PS C:\Kohya\kohya_ss> pip install torch==1.12.1+cu116 torchvision==0.13.1+cu116 --extra-index-url https://download.pytorch.org/whl/cu116
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu116
ERROR: Could not find a version that satisfies the requirement torch==1.12.1+cu116 (from versions: none)
ERROR: No matching distribution found for torch==1.12.1+cu116

The requirements.txt install correctly until it reaches tensorflow. But then the rest all give me errors as well.

ERROR: Could not find a version that satisfies the requirement tensorflow<2.11 (from versions: none)
ERROR: No matching distribution found for tensorflow<2.11
(venv) PS C:\Kohya\kohya_ss> 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
ERROR: xformers-0.0.14.dev0-cp310-cp310-win_amd64.whl is not a supported wheel on this platform.
(venv) PS C:\Kohya\kohya_ss>
(venv) PS C:\Kohya\kohya_ss> cp .\bitsandbytes_windows\*.dll .\venv\Lib\site-packages\bitsandbytes\
Copy-Item: A sintaxe do nome do arquivo, do nome do diretório ou do rótulo do volume está incorreta. : 'C:\Kohya\kohya_ss\venv\Lib\site-packages\bitsandbytes\'
Copy-Item: A sintaxe do nome do arquivo, do nome do diretório ou do rótulo do volume está incorreta. : 'C:\Kohya\kohya_ss\venv\Lib\site-packages\bitsandbytes\'
(venv) PS C:\Kohya\kohya_ss> cp .\bitsandbytes_windows\cextension.py .\venv\Lib\site-packages\bitsandbytes\cextension.py

Copy-Item: Could not find a part of the path 'C:\Kohya\kohya_ss\venv\Lib\site-packages\bitsandbytes\cextension.py'.
(venv) PS C:\Kohya\kohya_ss> cp .\bitsandbytes_windows\main.py .\venv\Lib\site-packages\bitsandbytes\cuda_setup\main.py
Copy-Item: Could not find a part of the path 'C:\Kohya\kohya_ss\venv\Lib\site-packages\bitsandbytes\cuda_setup\main.py'.
(venv) PS C:\Kohya\kohya_ss>
(venv) PS C:\Kohya\kohya_ss> accelerate config
accelerate: The term 'accelerate' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Is there anything additional I need to do here to make it work? Thanks for any help.

ARandomUserFromGithub commented 1 year ago

Same here, and someone else I talk to also have the same problem

Odawgthat commented 1 year ago

Same issue here :( I copied the entire venv folder from A1111 and it actually loaded up and everything, but I started running into issues at the training stage so I wouldn't reccomend

bmaltais commented 1 year ago

You really need to use python 3.10.9. As far as I know 3.11 will not work properly yet.

ARandomUserFromGithub commented 1 year ago

Is it possible to turn the initialisation commands into a .bat and let user specify a custom location for python? I have 3 versions of python cohabiting side by side as not all UIs uses the same version equally.

Edit, I had 3.10.6, 3.10 and 3.11 but not 3.10.9 but even after installing 3.10.9 I still get the same error

Vigilence commented 1 year ago

I managed to fix this issue by deleting my python folder located in the C:/ drive (for me) and then reinstalling python from the installation instructions link. After that I reran the installation script (found in the instructions) and it installed everything fine.

DivinoAG commented 1 year ago

I managed to fix this issue by deleting my python folder located in the C:/ drive (for me) and then reinstalling python from the installation instructions link. After that I reran the installation script (found in the instructions) and it installed everything fine.

That didn't work for me. And my original Python installation came from the exact same link anyway.

ARandomUserFromGithub commented 1 year ago

Some dude helped me figure it out! SealOf____ Specifying custom python path goes like that:

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

C:\Users[username]\AppData\Local\Programs\Python\Python310\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

DivinoAG commented 1 year ago

Some dude helped me figure it out! SealOf____ Specifying custom python path goes like that:

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

C:\Users[username]\AppData\Local\Programs\Python\Python310\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

You are a gentleman and a schollar. That absolutely worked. Thank you!