Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
May 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 changes: 26 additions & 0 deletions setup-3.10.bat
Original file line number Diff line number Diff line change
@@ -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
Loading