mirror of
https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git
synced 2026-06-05 09:10:25 +08:00
chore(format): run black on dev (#121)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
64f994be82
commit
3b4a546ced
@@ -18,7 +18,7 @@ def save_pickle(ckpt: dict, save_path: str):
|
||||
pickle.dump(ckpt, f)
|
||||
|
||||
|
||||
def load_inputs(path: FileLike, device: str, is_half=False): # type: ignore
|
||||
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)
|
||||
|
||||
@@ -28,9 +28,7 @@ def get_synthesizer(cpt: OrderedDict, device=torch.device("cpu")):
|
||||
return net_g, cpt
|
||||
|
||||
|
||||
def load_synthesizer(
|
||||
pth_path: FileLike, device=torch.device("cpu") # type: ignore
|
||||
):
|
||||
def load_synthesizer(pth_path: FileLike, device=torch.device("cpu")): # type: ignore
|
||||
return get_synthesizer(
|
||||
torch.load(pth_path, map_location=torch.device("cpu"), weights_only=True),
|
||||
device,
|
||||
|
||||
@@ -1 +1 @@
|
||||
from .io import FileLike
|
||||
from .io import FileLike
|
||||
|
||||
Reference in New Issue
Block a user