explicitly use python3 because some OSs will not have python alias to python3, allow batch size 1
This commit is contained in:
parent
8a1a48f31e
commit
f119993fb5
|
@ -2,12 +2,13 @@
|
|||
git submodule init
|
||||
git submodule update
|
||||
|
||||
python -m venv venv
|
||||
python3 -m venv venv
|
||||
source ./venv/bin/activate
|
||||
python -m pip install --upgrade pip
|
||||
python3 -m pip install --upgrade pip
|
||||
# CUDA
|
||||
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
|
||||
python -m pip install -r ./dlas/requirements.txt
|
||||
python -m pip install -r ./tortoise-tts/requirements.txt
|
||||
python -m pip install -r ./requirements.txt
|
||||
python -m pip install -e ./tortoise-tts/
|
||||
python3 -m pip install -r ./dlas/requirements.txt
|
||||
python3 -m pip install -r ./tortoise-tts/requirements.txt
|
||||
python3 -m pip install -r ./requirements.txt
|
||||
python3 -m pip install -e ./tortoise-tts/
|
||||
deactivate
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
git submodule init
|
||||
git submodule update
|
||||
|
||||
python -m venv venv
|
||||
python3 -m venv venv
|
||||
source ./venv/bin/activate
|
||||
python -m pip install --upgrade pip
|
||||
python3 -m pip install --upgrade pip
|
||||
# ROCM
|
||||
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/rocm5.1.1 # 5.2 does not work for me desu
|
||||
python -m pip install -r ./dlas/requirements.txt
|
||||
python -m pip install -r ./tortoise-tts/requirements.txt
|
||||
python -m pip install -r ./requirements.txt
|
||||
python -m pip install -e ./tortoise-tts/
|
||||
python3 -m pip install -r ./dlas/requirements.txt
|
||||
python3 -m pip install -r ./tortoise-tts/requirements.txt
|
||||
python3 -m pip install -r ./requirements.txt
|
||||
python3 -m pip install -e ./tortoise-tts/
|
||||
deactivate
|
||||
|
|
11
src/utils.py
11
src/utils.py
|
@ -575,14 +575,17 @@ def optimize_training_settings( epochs, batch_size, learning_rate, learning_rate
|
|||
batch_size = lines
|
||||
messages.append(f"Batch size is larger than your dataset, clamping batch size to: {batch_size}")
|
||||
|
||||
if batch_size / mega_batch_factor < 2:
|
||||
mega_batch_factor = int(batch_size / 2)
|
||||
messages.append(f"Mega batch factor is too large for the given batch size, clamping mega batch factor to: {mega_batch_factor}")
|
||||
|
||||
if batch_size % lines != 0:
|
||||
nearest_slice = int(lines / batch_size) + 1
|
||||
batch_size = int(lines / nearest_slice)
|
||||
messages.append(f"Batch size not neatly divisible by dataset size, adjusting batch size to: {batch_size} ({nearest_slice} steps per epoch)")
|
||||
|
||||
if batch_size == 1 and mega_batch_factor != 1:
|
||||
mega_batch_factor = 1
|
||||
messages.append(f"Mega batch factor is too large for the given batch size, clamping mega batch factor to: {mega_batch_factor}")
|
||||
elif batch_size / mega_batch_factor < 2:
|
||||
mega_batch_factor = int(batch_size / 2)
|
||||
messages.append(f"Mega batch factor is too large for the given batch size, clamping mega batch factor to: {mega_batch_factor}")
|
||||
|
||||
iterations = calc_iterations(epochs=epochs, lines=lines, batch_size=batch_size)
|
||||
|
||||
|
|
12
update.sh
12
update.sh
|
@ -2,14 +2,14 @@
|
|||
git pull
|
||||
git submodule update
|
||||
|
||||
python -m venv venv
|
||||
python3 -m venv venv
|
||||
source ./venv/bin/activate
|
||||
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install -r ./dlas/requirements.txt
|
||||
python -m pip install -r ./tortoise-tts/requirements.txt
|
||||
python -m pip install -e ./tortoise-tts
|
||||
python -m pip install -r ./requirements.txt
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install -r ./dlas/requirements.txt
|
||||
python3 -m pip install -r ./tortoise-tts/requirements.txt
|
||||
python3 -m pip install -e ./tortoise-tts
|
||||
python3 -m pip install -r ./requirements.txt
|
||||
|
||||
|
||||
deactivate
|
Loading…
Reference in New Issue
Block a user