1
0
mirror of https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git synced 2026-06-08 03:55:47 +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

@@ -5,6 +5,8 @@ import os
import torch
from rvc.utils import FileLike
def load_pickle(path: str):
with open(path, "rb") as f:
@@ -16,7 +18,7 @@ def save_pickle(ckpt: dict, save_path: str):
pickle.dump(ckpt, f)
def load_inputs(path: torch.serialization.FILE_LIKE, device: str, is_half=False):
def load_inputs(path: FileLike, device: str, is_half=False): # type: ignore
parm = torch.load(path, map_location=torch.device("cpu"))
for key in parm.keys():
parm[key] = parm[key].to(device)