From d2a74707c7dd4210df8dc3ad88bf71f175747f6b Mon Sep 17 00:00:00 2001 From: Koichi Yasuoka Date: Sun, 31 Aug 2025 08:53:55 +0900 Subject: [PATCH] weights_only=False for torch.load pytorch 2.6 (and after) changed `weights_only=True` as default --- supar/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supar/parser.py b/supar/parser.py index 94ead2cc..1aaabf9f 100644 --- a/supar/parser.py +++ b/supar/parser.py @@ -562,7 +562,7 @@ def load( args = Config(**locals()) if not os.path.exists(path): path = download(supar.MODEL[src].get(path, path), reload=reload) - state = torch.load(path, map_location='cpu') + state = torch.load(path, map_location='cpu', weights_only=False) cls = supar.PARSER[state['name']] if cls.NAME is None else cls args = state['args'].update(args) model = cls.MODEL(**args)