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)