diff --git a/trainer/io.py b/trainer/io.py index 165f6ea..615ad0a 100644 --- a/trainer/io.py +++ b/trainer/io.py @@ -77,10 +77,10 @@ def load_fsspec( filecache={"cache_storage": str(get_user_data_dir("tts_cache"))}, mode="rb", ) as f: - return torch.load(f, map_location=map_location, **kwargs) + return torch.load(f, map_location=map_location, weights_only=True, **kwargs) else: with fsspec.open(str(path), "rb") as f: - return torch.load(f, map_location=map_location, **kwargs) + return torch.load(f, map_location=map_location, weights_only=True, **kwargs) def load_checkpoint(