1
0
mirror of https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git synced 2026-06-10 04:50:26 +08:00

fix: no attribute 'FILE_LIKE'' & update instructions

This commit is contained in:
源文雨
2025-06-19 17:25:21 +09:00
parent b88cc1e8fe
commit 6223116f6b
30 changed files with 106 additions and 587 deletions

View File

@@ -4,6 +4,7 @@ import torch
from .layers.synthesizers import SynthesizerTrnMsNSFsid
from .jit import load_inputs, export_jit_model, save_pickle
from .utils import FileLike
def get_synthesizer(cpt: OrderedDict, device=torch.device("cpu")):
@@ -28,7 +29,7 @@ def get_synthesizer(cpt: OrderedDict, device=torch.device("cpu")):
def load_synthesizer(
pth_path: torch.serialization.FILE_LIKE, device=torch.device("cpu")
pth_path: FileLike, device=torch.device("cpu") # type: ignore
):
return get_synthesizer(
torch.load(pth_path, map_location=torch.device("cpu"), weights_only=True),