Spaces:
Build error
Build error
added button to just load a training set's loss information, added installing broncotc/bitsandbytes-rocm when running setup-rocm.sh
Browse files- setup-cuda.bat +3 -3
- setup-cuda.sh +11 -8
- setup-directml.bat +5 -4
- setup-rocm.sh +14 -8
- src/utils.py +17 -7
- src/webui.py +25 -11
- start.bat +0 -1
- train.bat +2 -2
- update-force.bat +13 -1
- update-force.sh +14 -1
- update.bat +1 -13
- update.sh +0 -10
setup-cuda.bat
CHANGED
@@ -7,12 +7,12 @@ python -m pip install --upgrade pip
|
|
7 |
python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117
|
8 |
python -m pip install -r .\dlas\requirements.txt
|
9 |
python -m pip install -r .\tortoise-tts\requirements.txt
|
10 |
-
python -m pip install -r .\requirements.txt
|
11 |
python -m pip install -e .\tortoise-tts\
|
|
|
12 |
|
13 |
xcopy .\dlas\bitsandbytes_windows\* .\venv\Lib\site-packages\bitsandbytes\. /Y
|
14 |
xcopy .\dlas\bitsandbytes_windows\cuda_setup\* .\venv\Lib\site-packages\bitsandbytes\cuda_setup\. /Y
|
15 |
xcopy .\dlas\bitsandbytes_windows\nn\* .\venv\Lib\site-packages\bitsandbytes\nn\. /Y
|
16 |
|
17 |
-
|
18 |
-
|
|
|
7 |
python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117
|
8 |
python -m pip install -r .\dlas\requirements.txt
|
9 |
python -m pip install -r .\tortoise-tts\requirements.txt
|
|
|
10 |
python -m pip install -e .\tortoise-tts\
|
11 |
+
python -m pip install -r .\requirements.txt
|
12 |
|
13 |
xcopy .\dlas\bitsandbytes_windows\* .\venv\Lib\site-packages\bitsandbytes\. /Y
|
14 |
xcopy .\dlas\bitsandbytes_windows\cuda_setup\* .\venv\Lib\site-packages\bitsandbytes\cuda_setup\. /Y
|
15 |
xcopy .\dlas\bitsandbytes_windows\nn\* .\venv\Lib\site-packages\bitsandbytes\nn\. /Y
|
16 |
|
17 |
+
pause
|
18 |
+
deactivate
|
setup-cuda.sh
CHANGED
@@ -1,14 +1,17 @@
|
|
1 |
#!/bin/bash
|
|
|
2 |
git submodule init
|
3 |
git submodule update --remote
|
4 |
-
|
5 |
python3 -m venv venv
|
6 |
source ./venv/bin/activate
|
7 |
-
python3 -m pip install --upgrade pip
|
8 |
# CUDA
|
9 |
-
|
10 |
-
|
11 |
-
python3 -m pip install -r ./
|
12 |
-
python3 -m pip install -r ./requirements.txt
|
13 |
-
python3 -m pip install -e ./tortoise-tts/
|
14 |
-
|
|
|
|
|
|
1 |
#!/bin/bash
|
2 |
+
# get local dependencies
|
3 |
git submodule init
|
4 |
git submodule update --remote
|
5 |
+
# setup venv
|
6 |
python3 -m venv venv
|
7 |
source ./venv/bin/activate
|
8 |
+
python3 -m pip install --upgrade pip # just to be safe
|
9 |
# CUDA
|
10 |
+
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117
|
11 |
+
# install requirements
|
12 |
+
python3 -m pip install -r ./dlas/requirements.txt # instal DLAS requirements
|
13 |
+
python3 -m pip install -r ./tortoise-tts/requirements.txt # install TorToiSe requirements
|
14 |
+
python3 -m pip install -e ./tortoise-tts/ # install TorToiSe
|
15 |
+
python3 -m pip install -r ./requirements.txt # install local requirements
|
16 |
+
|
17 |
+
deactivate
|
setup-directml.bat
CHANGED
@@ -4,10 +4,11 @@ git submodule update --remote
|
|
4 |
python -m venv venv
|
5 |
call .\venv\Scripts\activate.bat
|
6 |
python -m pip install --upgrade pip
|
7 |
-
python -m pip install torch torchvision torchaudio torch-directml
|
8 |
python -m pip install -r .\dlas\requirements.txt
|
9 |
python -m pip install -r .\tortoise-tts\requirements.txt
|
10 |
-
python -m pip install -r .\requirements.txt
|
11 |
python -m pip install -e .\tortoise-tts\
|
12 |
-
|
13 |
-
|
|
|
|
|
|
4 |
python -m venv venv
|
5 |
call .\venv\Scripts\activate.bat
|
6 |
python -m pip install --upgrade pip
|
7 |
+
python -m pip install torch torchvision torchaudio torch-directml
|
8 |
python -m pip install -r .\dlas\requirements.txt
|
9 |
python -m pip install -r .\tortoise-tts\requirements.txt
|
|
|
10 |
python -m pip install -e .\tortoise-tts\
|
11 |
+
python -m pip install -r .\requirements.txt
|
12 |
+
|
13 |
+
pause
|
14 |
+
deactivate
|
setup-rocm.sh
CHANGED
@@ -1,14 +1,20 @@
|
|
1 |
#!/bin/bash
|
|
|
2 |
git submodule init
|
3 |
git submodule update --remote
|
4 |
-
|
5 |
python3 -m venv venv
|
6 |
source ./venv/bin/activate
|
7 |
-
python3 -m pip install --upgrade pip
|
8 |
# ROCM
|
9 |
-
|
10 |
-
|
11 |
-
python3 -m pip install -r ./
|
12 |
-
python3 -m pip install -r ./requirements.txt
|
13 |
-
python3 -m pip install -e ./tortoise-tts/
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
#!/bin/bash
|
2 |
+
# get local dependencies
|
3 |
git submodule init
|
4 |
git submodule update --remote
|
5 |
+
# setup venv
|
6 |
python3 -m venv venv
|
7 |
source ./venv/bin/activate
|
8 |
+
python3 -m pip install --upgrade pip # just to be safe
|
9 |
# ROCM
|
10 |
+
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/rocm5.1.1 # 5.2 does not work for me desu
|
11 |
+
# install requirements
|
12 |
+
python3 -m pip install -r ./dlas/requirements.txt # instal DLAS requirements
|
13 |
+
python3 -m pip install -r ./tortoise-tts/requirements.txt # install TorToiSe requirements
|
14 |
+
python3 -m pip install -e ./tortoise-tts/ # install TorToiSe
|
15 |
+
python3 -m pip install -r ./requirements.txt # install local requirements
|
16 |
+
# swap to ROCm version of BitsAndBytes
|
17 |
+
pip3 uninstall bitsandbytes
|
18 |
+
pip3 install git+https://github.com/broncotc/bitsandbytes-rocm
|
19 |
+
|
20 |
+
deactivate
|
src/utils.py
CHANGED
@@ -477,7 +477,7 @@ def compute_latents(voice, voice_latents_chunks, progress=gr.Progress(track_tqdm
|
|
477 |
|
478 |
# superfluous, but it cleans up some things
|
479 |
class TrainingState():
|
480 |
-
def __init__(self, config_path, keep_x_past_datasets=0):
|
481 |
self.cmd = ['train.bat', config_path] if os.name == "nt" else ['bash', './train.sh', config_path]
|
482 |
|
483 |
# parse config to get its iteration
|
@@ -527,8 +527,10 @@ class TrainingState():
|
|
527 |
self.losses = []
|
528 |
|
529 |
self.load_losses()
|
530 |
-
|
531 |
-
|
|
|
|
|
532 |
|
533 |
def spawn_process(self):
|
534 |
print("Spawning process: ", " ".join(self.cmd))
|
@@ -778,11 +780,19 @@ def get_training_losses():
|
|
778 |
return
|
779 |
return pd.DataFrame(training_state.losses)
|
780 |
|
781 |
-
def update_training_dataplot():
|
782 |
global training_state
|
783 |
-
|
784 |
-
|
785 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
786 |
|
787 |
def reconnect_training(verbose=False, buffer_size=8, progress=gr.Progress(track_tqdm=True)):
|
788 |
global training_state
|
|
|
477 |
|
478 |
# superfluous, but it cleans up some things
|
479 |
class TrainingState():
|
480 |
+
def __init__(self, config_path, keep_x_past_datasets=0, start=True):
|
481 |
self.cmd = ['train.bat', config_path] if os.name == "nt" else ['bash', './train.sh', config_path]
|
482 |
|
483 |
# parse config to get its iteration
|
|
|
527 |
self.losses = []
|
528 |
|
529 |
self.load_losses()
|
530 |
+
if keep_x_past_datasets > 0:
|
531 |
+
self.cleanup_old(keep=keep_x_past_datasets)
|
532 |
+
if start:
|
533 |
+
self.spawn_process()
|
534 |
|
535 |
def spawn_process(self):
|
536 |
print("Spawning process: ", " ".join(self.cmd))
|
|
|
780 |
return
|
781 |
return pd.DataFrame(training_state.losses)
|
782 |
|
783 |
+
def update_training_dataplot(config_path=None):
|
784 |
global training_state
|
785 |
+
update = None
|
786 |
+
|
787 |
+
if not training_state:
|
788 |
+
training_state = TrainingState(config_path=config_path, start=False)
|
789 |
+
update = gr.LinePlot.update(value=pd.DataFrame(training_state.losses))
|
790 |
+
del training_state
|
791 |
+
training_state = None
|
792 |
+
else:
|
793 |
+
update = gr.LinePlot.update(value=pd.DataFrame(training_state.losses))
|
794 |
+
|
795 |
+
return update
|
796 |
|
797 |
def reconnect_training(verbose=False, buffer_size=8, progress=gr.Progress(track_tqdm=True)):
|
798 |
global training_state
|
src/webui.py
CHANGED
@@ -527,17 +527,9 @@ def setup_gradio():
|
|
527 |
with gr.Row():
|
528 |
with gr.Column():
|
529 |
training_configs = gr.Dropdown(label="Training Configuration", choices=get_training_list())
|
530 |
-
refresh_configs = gr.Button(value="Refresh Configurations")
|
531 |
with gr.Row():
|
532 |
-
|
533 |
-
|
534 |
-
reconnect_training_button = gr.Button(value="Reconnect")
|
535 |
-
with gr.Column():
|
536 |
-
training_output = gr.TextArea(label="Console Output", interactive=False, max_lines=8)
|
537 |
-
verbose_training = gr.Checkbox(label="Verbose Console Output", value=True)
|
538 |
-
training_buffer_size = gr.Slider(label="Console Buffer Size", minimum=4, maximum=32, value=8)
|
539 |
-
training_keep_x_past_datasets = gr.Slider(label="Keep X Previous States", minimum=0, maximum=8, value=0, step=1)
|
540 |
-
|
541 |
training_loss_graph = gr.LinePlot(label="Training Metrics",
|
542 |
x="step",
|
543 |
y="value",
|
@@ -545,8 +537,19 @@ def setup_gradio():
|
|
545 |
color="type",
|
546 |
tooltip=['step', 'value', 'type'],
|
547 |
width=600,
|
548 |
-
height=350
|
549 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
550 |
with gr.Tab("Settings"):
|
551 |
with gr.Row():
|
552 |
exec_inputs = []
|
@@ -763,6 +766,17 @@ def setup_gradio():
|
|
763 |
],
|
764 |
show_progress=False,
|
765 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
766 |
stop_training_button.click(stop_training,
|
767 |
inputs=None,
|
768 |
outputs=training_output #console_output
|
|
|
527 |
with gr.Row():
|
528 |
with gr.Column():
|
529 |
training_configs = gr.Dropdown(label="Training Configuration", choices=get_training_list())
|
|
|
530 |
with gr.Row():
|
531 |
+
refresh_configs = gr.Button(value="Refresh Configurations")
|
532 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
533 |
training_loss_graph = gr.LinePlot(label="Training Metrics",
|
534 |
x="step",
|
535 |
y="value",
|
|
|
537 |
color="type",
|
538 |
tooltip=['step', 'value', 'type'],
|
539 |
width=600,
|
540 |
+
height=350,
|
541 |
)
|
542 |
+
view_losses = gr.Button(value="View Losses")
|
543 |
+
|
544 |
+
with gr.Column():
|
545 |
+
training_output = gr.TextArea(label="Console Output", interactive=False, max_lines=8)
|
546 |
+
verbose_training = gr.Checkbox(label="Verbose Console Output", value=True)
|
547 |
+
training_buffer_size = gr.Slider(label="Console Buffer Size", minimum=4, maximum=32, value=8)
|
548 |
+
training_keep_x_past_datasets = gr.Slider(label="Keep X Previous States", minimum=0, maximum=8, value=0, step=1)
|
549 |
+
with gr.Row():
|
550 |
+
start_training_button = gr.Button(value="Train")
|
551 |
+
stop_training_button = gr.Button(value="Stop")
|
552 |
+
reconnect_training_button = gr.Button(value="Reconnect")
|
553 |
with gr.Tab("Settings"):
|
554 |
with gr.Row():
|
555 |
exec_inputs = []
|
|
|
766 |
],
|
767 |
show_progress=False,
|
768 |
)
|
769 |
+
|
770 |
+
view_losses.click(
|
771 |
+
fn=update_training_dataplot,
|
772 |
+
inputs=[
|
773 |
+
training_configs
|
774 |
+
],
|
775 |
+
outputs=[
|
776 |
+
training_loss_graph,
|
777 |
+
],
|
778 |
+
)
|
779 |
+
|
780 |
stop_training_button.click(stop_training,
|
781 |
inputs=None,
|
782 |
outputs=training_output #console_output
|
start.bat
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
call .\venv\Scripts\activate.bat
|
2 |
set PATH=.\bin\;%PATH%
|
3 |
python .\src\main.py %*
|
4 |
-
deactivate
|
5 |
pause
|
|
|
1 |
call .\venv\Scripts\activate.bat
|
2 |
set PATH=.\bin\;%PATH%
|
3 |
python .\src\main.py %*
|
|
|
4 |
pause
|
train.bat
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
call .\venv\Scripts\activate.bat
|
2 |
python ./src/train.py -opt "%1"
|
3 |
-
|
4 |
-
|
|
|
1 |
call .\venv\Scripts\activate.bat
|
2 |
python ./src/train.py -opt "%1"
|
3 |
+
pause
|
4 |
+
deactivate
|
update-force.bat
CHANGED
@@ -1,3 +1,15 @@
|
|
1 |
git fetch --all
|
2 |
git reset --hard origin/master
|
3 |
-
call .\update.bat
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
git fetch --all
|
2 |
git reset --hard origin/master
|
3 |
+
call .\update.bat
|
4 |
+
|
5 |
+
python -m venv venv
|
6 |
+
call .\venv\Scripts\activate.bat
|
7 |
+
|
8 |
+
python -m pip install --upgrade pip
|
9 |
+
python -m pip install -r .\dlas\requirements.txt
|
10 |
+
python -m pip install -r .\tortoise-tts\requirements.txt
|
11 |
+
python -m pip install -e .\tortoise-tts
|
12 |
+
python -m pip install -r .\requirements.txt
|
13 |
+
|
14 |
+
pause
|
15 |
+
deactivate
|
update-force.sh
CHANGED
@@ -1,4 +1,17 @@
|
|
1 |
#!/bin/bash
|
2 |
git fetch --all
|
3 |
git reset --hard origin/master
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
#!/bin/bash
|
2 |
git fetch --all
|
3 |
git reset --hard origin/master
|
4 |
+
|
5 |
+
./update.sh
|
6 |
+
|
7 |
+
# force install requirements
|
8 |
+
python3 -m venv venv
|
9 |
+
source ./venv/bin/activate
|
10 |
+
|
11 |
+
python3 -m pip install --upgrade pip
|
12 |
+
python3 -m pip install -r ./dlas/requirements.txt
|
13 |
+
python3 -m pip install -r ./tortoise-tts/requirements.txt
|
14 |
+
python3 -m pip install -e ./tortoise-tts
|
15 |
+
python3 -m pip install -r ./requirements.txt
|
16 |
+
|
17 |
+
deactivate
|
update.bat
CHANGED
@@ -1,14 +1,2 @@
|
|
1 |
git pull
|
2 |
-
git submodule update --remote
|
3 |
-
|
4 |
-
python -m venv venv
|
5 |
-
call .\venv\Scripts\activate.bat
|
6 |
-
|
7 |
-
python -m pip install --upgrade pip
|
8 |
-
python -m pip install -r .\dlas\requirements.txt
|
9 |
-
python -m pip install -r .\tortoise-tts\requirements.txt
|
10 |
-
python -m pip install -e .\tortoise-tts
|
11 |
-
python -m pip install -r .\requirements.txt
|
12 |
-
|
13 |
-
deactivate
|
14 |
-
pause
|
|
|
1 |
git pull
|
2 |
+
git submodule update --remote
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
update.sh
CHANGED
@@ -2,14 +2,4 @@
|
|
2 |
git pull
|
3 |
git submodule update --remote
|
4 |
|
5 |
-
python3 -m venv venv
|
6 |
-
source ./venv/bin/activate
|
7 |
-
|
8 |
-
python3 -m pip install --upgrade pip
|
9 |
-
python3 -m pip install -r ./dlas/requirements.txt
|
10 |
-
python3 -m pip install -r ./tortoise-tts/requirements.txt
|
11 |
-
python3 -m pip install -e ./tortoise-tts
|
12 |
-
python3 -m pip install -r ./requirements.txt
|
13 |
-
|
14 |
-
|
15 |
deactivate
|
|
|
2 |
git pull
|
3 |
git submodule update --remote
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
deactivate
|