Implement support to setup venv with python 3.10.x on windows (#2444)

pull/2448/head
bmaltais 2024-05-05 11:23:20 -04:00 committed by GitHub
parent adc33352a7
commit a6e7e1050e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 36 additions and 1 deletions

View File

@ -94,12 +94,20 @@ To set up the project, follow these steps:
cd kohya_ss
```
4. Run the setup script by executing the following command:
4. Run one of the following setup script by executing the following command:
For systems with only python 3.10.11 installed:
```shell
.\setup.bat
```
For systems with only more than one python release installed:
```shell
.\setup-3.10.bat
```
During the accelerate config step, use the default values as proposed during the configuration unless you know your hardware demands otherwise. The amount of VRAM on your GPU does not impact the values used.
#### Optional: CUDNN 8.9.6.50
@ -438,3 +446,4 @@ ControlNet dataset is used to specify the mask. The mask images should be the RG
- To ensure cross-platform compatibility and security, the GUI now defaults to using "shell=False" when running subprocesses. This is based on documentation and should not cause issues on most platforms. However, some users have reported issues on specific platforms such as runpod and colab. PLease open an issue if you encounter any issues.
- Add support for custom LyCORIS toml config files. Simply type the path to the config file in the LyCORIS preset dropdown.
- Improve files and folders validation
- Added a new setup-3.10.bat file to set the venv to specifically use python 3.10.x instead of the default python the system might use.

26
setup-3.10.bat Normal file
View File

@ -0,0 +1,26 @@
@echo off
IF NOT EXIST venv (
echo Creating venv...
py -3.10 -m venv venv
)
:: Create the directory if it doesn't exist
mkdir ".\logs\setup" > nul 2>&1
:: Deactivate the virtual environment to prevent error
call .\venv\Scripts\deactivate.bat
call .\venv\Scripts\activate.bat
REM Check if the batch was started via double-click
IF /i "%comspec% /c %~0 " equ "%cmdcmdline:"=%" (
REM echo This script was started by double clicking.
cmd /k python .\setup\setup_windows.py
) ELSE (
REM echo This script was started from a command prompt.
python .\setup\setup_windows.py %*
)
:: Deactivate the virtual environment
call .\venv\Scripts\deactivate.bat