From 0c2a9168f85aabdddc7f9bb2b0c41141a5bc70d3 Mon Sep 17 00:00:00 2001 From: mrq Date: Tue, 21 Mar 2023 15:46:53 +0000 Subject: [PATCH] DLAS is PIPified (but I'm still cloning it as a submodule to make updating it easier) --- setup-cuda.bat | 1 + setup-cuda.sh | 1 + setup-directml.bat | 1 + setup-rocm.sh | 1 + src/train.py | 8 ++------ src/webui.py | 2 +- update-force.sh | 3 ++- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/setup-cuda.bat b/setup-cuda.bat index 15f2da8..8c75c1f 100755 --- a/setup-cuda.bat +++ b/setup-cuda.bat @@ -8,6 +8,7 @@ python -m pip install torch torchvision torchaudio --extra-index-url https://dow 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 +python -m pip install -e .\modules\dlas\ python -m pip install -r .\requirements.txt # setup BnB diff --git a/setup-cuda.sh b/setup-cuda.sh index 0e4c40e..72ffe14 100755 --- a/setup-cuda.sh +++ b/setup-cuda.sh @@ -12,6 +12,7 @@ pip3 install torch torchvision torchaudio --extra-index-url https://download.pyt 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 +python3 -m pip install -e ./modules/dlas/ # install DLAS python3 -m pip install -r ./requirements.txt # install local requirements rm *.bat diff --git a/setup-directml.bat b/setup-directml.bat index 3762860..a85fe75 100755 --- a/setup-directml.bat +++ b/setup-directml.bat @@ -8,6 +8,7 @@ python -m pip install torch==1.13.1 torchvision torchaudio torch-directml 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 +python -m pip install -e .\modules\dlas\ python -m pip install -r .\requirements.txt del *.sh diff --git a/setup-rocm.sh b/setup-rocm.sh index 3ac1cd4..249e4ab 100755 --- a/setup-rocm.sh +++ b/setup-rocm.sh @@ -12,6 +12,7 @@ pip3 install torch==1.13.1 torchvision torchaudio --extra-index-url https://down 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 +python3 -m pip install -e ./modules/dlas/ # install DLAS python3 -m pip install -r ./requirements.txt # install local requirements rm *.bat diff --git a/src/train.py b/src/train.py index acd15a4..1c50e57 100755 --- a/src/train.py +++ b/src/train.py @@ -6,10 +6,6 @@ import datetime from torch.distributed.run import main as torchrun -# it'd be downright sugoi if I was able to install DLAS as a pip package -sys.path.insert(0, './modules/dlas/codes/') -sys.path.insert(0, './modules/dlas/') - # this is effectively just copy pasted and cleaned up from the __main__ section of training.py def train(config_path, launcher='none'): opt = option.parse(config_path, is_train=True) @@ -62,7 +58,7 @@ if __name__ == "__main__": pass import torch - from codes import train as tr - from utils import util, options as option + from dlas import train as tr + from dlas.utils import util, options as option train(config_path, args.launcher) \ No newline at end of file diff --git a/src/webui.py b/src/webui.py index 7436739..0472d2e 100755 --- a/src/webui.py +++ b/src/webui.py @@ -199,7 +199,7 @@ def prepare_dataset_proxy( voice, language, validation_text_length, validation_a messages.append(message) if slice_audio: - message = slice_dataset( voice, trim_silence=trim_silence, start_offset=slice_start_offset, end_offset=slice_end_offset, progress=progress ) + message = slice_dataset( voice, trim_silence=trim_silence, start_offset=slice_start_offset, end_offset=slice_end_offset, results=None, progress=progress ) messages.append(message) message = prepare_dataset( voice, use_segments=slice_audio, text_length=validation_text_length, audio_length=validation_audio_length, progress=progress ) diff --git a/update-force.sh b/update-force.sh index 4832988..829e946 100755 --- a/update-force.sh +++ b/update-force.sh @@ -10,8 +10,9 @@ source ./venv/bin/activate python3 -m pip install --upgrade pip python3 -m pip install -r ./modules/tortoise-tts/requirements.txt -python3 -m pip install -e ./modules/tortoise-tts +python3 -m pip install -e ./modules/tortoise-tts python3 -m pip install -r ./modules/dlas/requirements.txt +python3 -m pip install -e ./modules/dlas python3 -m pip install -r ./requirements.txt deactivate \ No newline at end of file