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

feat: update to latest torch & gradio version

This commit is contained in:
源文雨
2024-11-27 22:16:06 +09:00
parent 7c0b1c01f1
commit 4b68fb0e13
8 changed files with 40 additions and 37 deletions

View File

@@ -71,9 +71,7 @@ def load_checkpoint_d(checkpoint_path, combd, sbd, optimizer=None, load_opt=1):
def load_checkpoint(checkpoint_path, model, optimizer=None, load_opt=1):
assert os.path.isfile(checkpoint_path)
checkpoint_dict = torch.load(checkpoint_path, map_location="cpu")
saved_state_dict = checkpoint_dict["model"]
saved_state_dict = torch.load(checkpoint_path, map_location="cpu", weights_only=True)["model"]
if hasattr(model, "module"):
state_dict = model.module.state_dict()
else: