From bdab05320df4e92403672ec60f26f976143e7d63 Mon Sep 17 00:00:00 2001 From: Mangio621 Date: Thu, 4 May 2023 11:47:58 +1000 Subject: [PATCH] Changed torchcrepe to version 0.0.18 in requirements. Torch version to default 2.0.0. Resolved torch cuda device VC to int error. Added 1 as minimum value to the crepe_hop_length in the web GUI. --- infer-web.py | 2 +- requirements.txt | 4 ++-- vc_infer_pipeline.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/infer-web.py b/infer-web.py index 9af4221..13c4b32 100644 --- a/infer-web.py +++ b/infer-web.py @@ -1072,7 +1072,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as app: interactive=True, ) crepe_hop_length = gr.Slider( - minimum=32, + minimum=1, maximum=512, step=32, label=i18n("crepe_hop_length"), diff --git a/requirements.txt b/requirements.txt index 125bbd3..b600fc9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -29,8 +29,8 @@ tensorboard tensorboard-data-server tensorboard-plugin-wit torchgen>=0.0.1 -torch -torchcrepe +torch==2.0.0 +torchcrepe==0.0.18 tqdm>=4.65.0 tornado>=6.2 Werkzeug>=2.2.3 diff --git a/vc_infer_pipeline.py b/vc_infer_pipeline.py index a678ae9..eca79af 100644 --- a/vc_infer_pipeline.py +++ b/vc_infer_pipeline.py @@ -33,7 +33,7 @@ class VC(object): def get_optimal_torch_device(index: int = 0) -> torch.device: # Get cuda device if torch.cuda.is_available(): - return torch.device(f"cuda:{index % torch.cuda.device_count()}") + return torch.device("cuda:" + str(index)) # Very fast elif torch.backends.mps.is_available(): return torch.device("mps") # Insert an else here to grab "xla" devices if available. TO DO later. Requires the torch_xla.core.xla_model library