From 03f82fe5c0b9d6bb1ae869f31abe2b0707aa915c Mon Sep 17 00:00:00 2001 From: Kirill Bukshuk Date: Mon, 11 Aug 2025 12:39:50 +0800 Subject: [PATCH] Set torch.load weights_only to False explicitly --- DeepFilterNet/df/checkpoint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DeepFilterNet/df/checkpoint.py b/DeepFilterNet/df/checkpoint.py index 858ef6430..330bef765 100644 --- a/DeepFilterNet/df/checkpoint.py +++ b/DeepFilterNet/df/checkpoint.py @@ -74,7 +74,7 @@ def read_cp( epoch = get_epoch(latest) if log: logger.info("Found checkpoint {} with epoch {}".format(latest, epoch)) - latest = torch.load(latest, map_location="cpu") + latest = torch.load(latest, map_location="cpu", weights_only=False) latest = {k.replace("clc", "df"): v for k, v in latest.items()} if blacklist: reg = re.compile("".join(f"({b})|" for b in blacklist)[:-1])