while I'm breaking things, migrating dependencies to modules folder for tidiness

This commit is contained in:
mrq 2023-03-09 04:03:57 +00:00
parent b8867a5fb0
commit b64948d966
11 changed files with 39 additions and 30 deletions

4
.gitmodules vendored
View File

@ -1,6 +1,6 @@
[submodule "tortoise-tts"]
path = tortoise-tts
path = modules/tortoise-tts
url = https://git.ecker.tech/mrq/tortoise-tts
[submodule "dlas"]
path = dlas
path = modules/dlas
url = https://git.ecker.tech/mrq/DL-Art-School

View File

View File

@ -6,13 +6,15 @@ call .\venv\Scripts\activate.bat
python -m pip install --upgrade pip
python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117
python -m pip install -r .\requirements.txt
python -m pip install -r .\tortoise-tts\requirements.txt
python -m pip install -e .\tortoise-tts\
python -m pip install -r .\dlas\requirements.txt
python -m pip install -r .\modules\tortoise-tts\requirements.txt
python -m pip install -e .\modules\tortoise-tts\
python -m pip install -r .\modules\dlas\requirements.txt
xcopy .\dlas\bitsandbytes_windows\* .\venv\Lib\site-packages\bitsandbytes\. /Y
xcopy .\dlas\bitsandbytes_windows\cuda_setup\* .\venv\Lib\site-packages\bitsandbytes\cuda_setup\. /Y
xcopy .\dlas\bitsandbytes_windows\nn\* .\venv\Lib\site-packages\bitsandbytes\nn\. /Y
xcopy .\modules\dlas\bitsandbytes_windows\* .\venv\Lib\site-packages\bitsandbytes\. /Y
xcopy .\modules\dlas\bitsandbytes_windows\cuda_setup\* .\venv\Lib\site-packages\bitsandbytes\cuda_setup\. /Y
xcopy .\modules\dlas\bitsandbytes_windows\nn\* .\venv\Lib\site-packages\bitsandbytes\nn\. /Y
del *.sh
pause
deactivate

View File

@ -10,8 +10,9 @@ python3 -m pip install --upgrade pip # just to be safe
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117
# install requirements
python3 -m pip install -r ./requirements.txt # install local requirements
python3 -m pip install -r ./tortoise-tts/requirements.txt # install TorToiSe requirements
python3 -m pip install -e ./tortoise-tts/ # install TorToiSe
python3 -m pip install -r ./dlas/requirements.txt # instal DLAS requirements, last, because whisperx will break a dependency here
python3 -m pip install -r ./modules/tortoise-tts/requirements.txt # install TorToiSe requirements
python3 -m pip install -e ./modules/tortoise-tts/ # install TorToiSe
python3 -m pip install -r ./modules/dlas/requirements.txt # instal DLAS requirements, last, because whisperx will break a dependency here
rm *.bat
deactivate

View File

@ -6,9 +6,11 @@ call .\venv\Scripts\activate.bat
python -m pip install --upgrade pip
python -m pip install torch torchvision torchaudio torch-directml
python -m pip install -r .\requirements.txt
python -m pip install -r .\tortoise-tts\requirements.txt
python -m pip install -e .\tortoise-tts\
python -m pip install -r .\dlas\requirements.txt
python -m pip install -r .\modules\tortoise-tts\requirements.txt
python -m pip install -e .\modules\tortoise-tts\
python -m pip install -r .\modules\dlas\requirements.txt
del *.sh
pause
deactivate

View File

@ -1,8 +1,11 @@
#!/bin/bash
source ./venv/bin/activate
git clone https://git.ecker.tech/mrq/bitsandbytes-rocm
cd bitsandbytes-rocm
# swap to ROCm version of BitsAndBytes
pip3 uninstall -y bitsandbytes
git clone https://git.ecker.tech/mrq/bitsandbytes-rocm modules/bitsandbytes-rocm
cd modules/bitsandbytes-rocm
make hip
CUDA_VERSION=gfx1030 python setup.py install # assumes you're using a 6XXX series card
python3 -m bitsandbytes # to validate it works
cd ..
cd ../..

View File

@ -10,10 +10,11 @@ python3 -m pip install --upgrade pip # just to be safe
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/rocm5.1.1 # 5.2 does not work for me desu
# install requirements
python3 -m pip install -r ./requirements.txt # install local requirements
python3 -m pip install -r ./tortoise-tts/requirements.txt # install TorToiSe requirements
python3 -m pip install -e ./tortoise-tts/ # install TorToiSe
python3 -m pip install -r ./dlas/requirements.txt # instal DLAS requirements
# swap to ROCm version of BitsAndBytes
pip3 uninstall -y bitsandbytes
python3 -m pip install -r ./modules/tortoise-tts/requirements.txt # install TorToiSe requirements
python3 -m pip install -e ./modules/tortoise-tts/ # install TorToiSe
python3 -m pip install -r ./modules/dlas/requirements.txt # instal DLAS requirements
rm *.bat
./setup-rocm-bnb.sh
deactivate

View File

@ -33,10 +33,10 @@ if __name__ == "__main__":
# this is some massive kludge that only works if it's called from a shell and not an import/PIP package
# it's smart-yet-irritating module-model loader breaks when trying to load something specifically when not from a shell
sys.path.insert(0, './dlas/codes/')
sys.path.insert(0, './modules/dlas/codes/')
# this is also because DLAS is not written as a package in mind
# it'll gripe when it wants to import from train.py
sys.path.insert(0, './dlas/')
sys.path.insert(0, './modules/dlas/')
# for PIP, replace it with:
# sys.path.insert(0, os.path.dirname(os.path.realpath(dlas.__file__)))

View File

@ -7,9 +7,9 @@ call .\venv\Scripts\activate.bat
python -m pip install --upgrade pip
python -m pip install -U -r .\requirements.txt
python -m pip install -U -r .\tortoise-tts\requirements.txt
python -m pip install -U -e .\tortoise-tts
python -m pip install -U -r .\dlas\requirements.txt
python -m pip install -U -r .\modules\tortoise-tts\requirements.txt
python -m pip install -U -e .\modules\tortoise-tts
python -m pip install -U -r .\modules\dlas\requirements.txt
pause
deactivate

View File

@ -10,8 +10,8 @@ source ./venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install -r ./requirements.txt
python3 -m pip install -r ./tortoise-tts/requirements.txt
python3 -m pip install -e ./tortoise-tts
python3 -m pip install -r ./dlas/requirements.txt
python3 -m pip install -r ./modules/tortoise-tts/requirements.txt
python3 -m pip install -e ./modules/tortoise-tts
python3 -m pip install -r ./modules/dlas/requirements.txt
deactivate