Merge branch 'dev' into consolidated_install_scripts
This commit is contained in:
commit
d8285a7040
31
README.md
31
README.md
@ -107,33 +107,16 @@ If you are using the interactive mode, our default values for the accelerate con
|
|||||||
These are the same answers as the Windows install.
|
These are the same answers as the Windows install.
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
In the terminal, run:
|
||||||
|
|
||||||
Give unrestricted script access to powershell so venv can work:
|
```
|
||||||
|
|
||||||
- Run PowerShell as an administrator
|
|
||||||
- Run `Set-ExecutionPolicy Unrestricted` and answer 'A'
|
|
||||||
- Close PowerShell
|
|
||||||
|
|
||||||
Open a regular user Powershell terminal and run the following commands:
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
git clone https://github.com/bmaltais/kohya_ss.git
|
git clone https://github.com/bmaltais/kohya_ss.git
|
||||||
cd kohya_ss
|
cd kohya_ss
|
||||||
|
setup.bat
|
||||||
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
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Then configure accelerate with the same answers as in the MacOS instructions when prompted.
|
||||||
|
|
||||||
### Optional: CUDNN 8.6
|
### Optional: CUDNN 8.6
|
||||||
|
|
||||||
This step is optional but can improve the learning speed for NVIDIA 30X0/40X0 owners. It allows for larger training batch size and faster training speed.
|
This step is optional but can improve the learning speed for NVIDIA 30X0/40X0 owners. It allows for larger training batch size and faster training speed.
|
||||||
@ -168,7 +151,7 @@ pip install --use-pep517 --upgrade -r requirements.txt
|
|||||||
When a new release comes out, you can upgrade your repo with the following commands in the root directory:
|
When a new release comes out, you can upgrade your repo with the following commands in the root directory:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
./upgrade.ps1
|
upgrade.bat
|
||||||
```
|
```
|
||||||
|
|
||||||
### Linux and macOS Upgrade
|
### Linux and macOS Upgrade
|
||||||
@ -274,6 +257,8 @@ This will store your a backup file with your current locally installed pip packa
|
|||||||
|
|
||||||
## Change History
|
## Change History
|
||||||
|
|
||||||
|
* 2023/03/30 (v21.3.8)
|
||||||
|
- Fix issue with LyCORIS version not being found: https://github.com/bmaltais/kohya_ss/issues/481
|
||||||
* 2023/03/29 (v21.3.7)
|
* 2023/03/29 (v21.3.7)
|
||||||
- Allow for 0.1 increment in Network and Conv alpha values: https://github.com/bmaltais/kohya_ss/pull/471 Thanks to @srndpty
|
- Allow for 0.1 increment in Network and Conv alpha values: https://github.com/bmaltais/kohya_ss/pull/471 Thanks to @srndpty
|
||||||
- Updated Lycoris module version
|
- Updated Lycoris module version
|
||||||
|
@ -28,6 +28,7 @@ huggingface-hub==0.13.0
|
|||||||
tensorflow==2.10.1; sys_platform != 'darwin'
|
tensorflow==2.10.1; sys_platform != 'darwin'
|
||||||
tensorflow-macos==2.12.0; sys_platform == 'darwin'
|
tensorflow-macos==2.12.0; sys_platform == 'darwin'
|
||||||
# For locon support
|
# For locon support
|
||||||
lycoris_lora==0.1.4
|
lycoris-lora @ git+https://github.com/KohakuBlueleaf/LyCORIS.git@c3d925421209a22a60d863ffa3de0b3e7e89f047
|
||||||
|
# lycoris_lora==0.1.4
|
||||||
# for kohya_ss library
|
# for kohya_ss library
|
||||||
.
|
.
|
13
setup.bat
Normal file
13
setup.bat
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
@echo off
|
||||||
|
python -m venv venv
|
||||||
|
call .\venv\Scripts\activate.bat
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
copy /y .\bitsandbytes_windows\*.dll .\venv\Lib\site-packages\bitsandbytes\
|
||||||
|
copy /y .\bitsandbytes_windows\cextension.py .\venv\Lib\site-packages\bitsandbytes\cextension.py
|
||||||
|
copy /y .\bitsandbytes_windows\main.py .\venv\Lib\site-packages\bitsandbytes\cuda_setup\main.py
|
||||||
|
|
||||||
|
accelerate config
|
@ -25,7 +25,19 @@ for requirement in requirements:
|
|||||||
try:
|
try:
|
||||||
pkg_resources.require(requirement)
|
pkg_resources.require(requirement)
|
||||||
except pkg_resources.DistributionNotFound:
|
except pkg_resources.DistributionNotFound:
|
||||||
missing_requirements.append(requirement)
|
# Check if the requirement contains a VCS URL
|
||||||
|
if "@" in requirement:
|
||||||
|
# If it does, split the requirement into two parts: the package name and the VCS URL
|
||||||
|
package_name, vcs_url = requirement.split("@", 1)
|
||||||
|
# Use pip to install the package from the VCS URL
|
||||||
|
os.system(f"pip install -e {vcs_url}")
|
||||||
|
# Try to require the package again
|
||||||
|
try:
|
||||||
|
pkg_resources.require(package_name)
|
||||||
|
except pkg_resources.DistributionNotFound:
|
||||||
|
missing_requirements.append(requirement)
|
||||||
|
else:
|
||||||
|
missing_requirements.append(requirement)
|
||||||
except pkg_resources.VersionConflict as e:
|
except pkg_resources.VersionConflict as e:
|
||||||
wrong_version_requirements.append((requirement, str(e.req), e.dist.version))
|
wrong_version_requirements.append((requirement, str(e.req), e.dist.version))
|
||||||
|
|
||||||
|
16
upgrade.bat
Normal file
16
upgrade.bat
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
@echo off
|
||||||
|
:: Check if there are any changes that need to be committed
|
||||||
|
git status --short
|
||||||
|
if %errorlevel%==1 (
|
||||||
|
echo There are changes that need to be committed. Please stash or undo your changes before running this script.
|
||||||
|
exit
|
||||||
|
)
|
||||||
|
|
||||||
|
:: Pull the latest changes from the remote repository
|
||||||
|
git pull
|
||||||
|
|
||||||
|
:: Activate the virtual environment
|
||||||
|
call .\venv\Scripts\activate.baT
|
||||||
|
|
||||||
|
:: Upgrade the required packages
|
||||||
|
pip install --upgrade -r requirements.txt
|
Loading…
Reference in New Issue
Block a user