Skip to content

Commit

Permalink
more torch.load fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AznamirWoW committed Feb 1, 2025
1 parent c5c4bf4 commit eb21d9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rvc/train/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def record(self):


def verify_checkpoint_shapes(checkpoint_path, model):
checkpoint = torch.load(checkpoint_path, map_location="cpu")
checkpoint = torch.load(checkpoint_path, map_location="cpu", weights_only=True)
checkpoint_state_dict = checkpoint["model"]
try:
if hasattr(model, "module"):
Expand Down
2 changes: 1 addition & 1 deletion tabs/inference/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def refresh_embedders_folders():
def get_speakers_id(model):
if model:
try:
model_data = torch.load(os.path.join(now_dir, model), map_location="cpu")
model_data = torch.load(os.path.join(now_dir, model), map_location="cpu", weights_only=True)
speakers_id = model_data.get("speakers_id")
if speakers_id:
return list(range(speakers_id))
Expand Down

0 comments on commit eb21d9d

Please sign in to comment.