mirror of
https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-06-07 10:10:23 +08:00
fix: no attribute 'FILE_LIKE'' & update instructions
This commit is contained in:
@@ -13,6 +13,7 @@ from torchaudio.transforms import Resample
|
||||
|
||||
from rvc.f0 import Generator
|
||||
from rvc.synthesizer import load_synthesizer
|
||||
from rvc.utils import FileLike
|
||||
|
||||
|
||||
class RVC:
|
||||
@@ -20,7 +21,7 @@ class RVC:
|
||||
self,
|
||||
key: Union[int, float],
|
||||
formant: Union[int, float],
|
||||
pth_path: torch.serialization.FILE_LIKE,
|
||||
pth_path: FileLike, # type: ignore
|
||||
index_path: str,
|
||||
index_rate: Union[int, float],
|
||||
n_cpu: int = os.cpu_count(),
|
||||
|
||||
@@ -40,7 +40,7 @@ if "privateuseone" not in device:
|
||||
elif torch.backends.mps.is_available():
|
||||
device = "mps"
|
||||
else:
|
||||
import torch_directml
|
||||
import torch_directml # type: ignore
|
||||
|
||||
device = torch_directml.device(torch_directml.default_device())
|
||||
|
||||
@@ -89,7 +89,7 @@ printt("load model(s) from {}".format(model_path))
|
||||
# if hubert model is exist
|
||||
if os.access(model_path, os.F_OK) == False:
|
||||
printt(
|
||||
"Error: Extracting is shut down because %s does not exist, you may download it from https://huggingface.co/lj1995/VoiceConversionWebUI/tree/main"
|
||||
"Error: Extracting is shut down because %s does not exist."
|
||||
% model_path
|
||||
)
|
||||
exit(0)
|
||||
|
||||
Reference in New Issue
Block a user