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.

This commit is contained in:
Mangio621
2023-05-04 11:47:58 +10:00
parent c3fa1664f6
commit bdab05320d
3 changed files with 4 additions and 4 deletions

View File

@@ -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"),

View File

@@ -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

View File

@@ -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