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

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

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2024-06-14 22:45:03 +09:00
committed by GitHub
parent c51a73f521
commit ed8a0c3e34
8 changed files with 14 additions and 3 deletions

View File

@@ -15,6 +15,7 @@ def save_pickle(ckpt: dict, save_path: str):
with open(save_path, "wb") as f:
pickle.dump(ckpt, f)
def load_inputs(path: torch.serialization.FILE_LIKE, device: str, is_half=False):
parm = torch.load(path, map_location=torch.device("cpu"))
for key in parm.keys():
@@ -25,6 +26,7 @@ def load_inputs(path: torch.serialization.FILE_LIKE, device: str, is_half=False)
parm[key] = parm[key].float()
return parm
def export_jit_model(
model: torch.nn.Module,
mode: str = "trace",