Skip to content

Commit

Permalink
fix(pre_hubert): fix vram estimiation
Browse files Browse the repository at this point in the history
  • Loading branch information
34j committed Apr 3, 2023
1 parent 229f9ba commit 17fa86c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/so_vits_svc_fork/preprocessing/preprocess_hubert_f0.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
from .preprocess_utils import check_hubert_min_duration

LOG = getLogger(__name__)
HUBERT_MEMORY = 1250
HUBERT_MEMORY = 1600
HUBERT_MEMORY_CREPE = 2600


def _process_one(
Expand Down Expand Up @@ -99,7 +100,9 @@ def preprocess_hubert_f0(
hps = utils.get_hparams(config_path)
if n_jobs is None:
memory = get_total_gpu_memory("free")
n_jobs = memory // HUBERT_MEMORY
n_jobs = memory // (
HUBERT_MEMORY_CREPE if f0_method == "crepe" else HUBERT_MEMORY
)
LOG.info(f"n_jobs automatically set to {n_jobs}, memory: {memory} MiB")

filepaths = list(input_dir.rglob("*.wav"))
Expand Down

0 comments on commit 17fa86c

Please sign in to comment.