1
0
mirror of https://github.com/fumiama/Retrieval-based-Voice-Conversion-WebUI.git synced 2026-06-07 19:40:44 +08:00

chore(format): run black on dev (#2106)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2024-06-05 15:32:33 +09:00
committed by GitHub
parent 0d2189fdeb
commit a322e706f9
2 changed files with 7 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
import torch
def get_synthesizer_ckpt(cpt, device=torch.device("cpu")):
from infer.lib.infer_pack.models import (
SynthesizerTrnMs256NSFsid,
@@ -35,7 +36,9 @@ def get_synthesizer_ckpt(cpt, device=torch.device("cpu")):
net_g.remove_weight_norm()
return net_g, cpt
def get_synthesizer(pth_path, device=torch.device("cpu")):
return get_synthesizer_ckpt(
torch.load(pth_path, map_location=torch.device("cpu")), device,
torch.load(pth_path, map_location=torch.device("cpu")),
device,
)