diff --git a/resemblyzer/voice_encoder.py b/resemblyzer/voice_encoder.py index d6306f0..eddc230 100644 --- a/resemblyzer/voice_encoder.py +++ b/resemblyzer/voice_encoder.py @@ -40,7 +40,7 @@ def __init__(self, device: Union[str, torch.device]=None, verbose=True, weights_ raise Exception("Couldn't find the voice encoder pretrained model at %s." % weights_fpath) start = timer() - checkpoint = torch.load(weights_fpath, map_location="cpu") + checkpoint = torch.load(weights_fpath, map_location="cpu", weights_only=True) self.load_state_dict(checkpoint["model_state"], strict=False) self.to(device)