From 21d295f46e2d1227b8040d73c457f622cd5dd74a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6lzer?= Date: Thu, 9 Jan 2025 13:33:26 +0100 Subject: [PATCH] Fix cuda-cpu load in convert --- darts/src/darts/legacy_training/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/darts/src/darts/legacy_training/util.py b/darts/src/darts/legacy_training/util.py index a50a22b..bce48c6 100644 --- a/darts/src/darts/legacy_training/util.py +++ b/darts/src/darts/legacy_training/util.py @@ -33,7 +33,7 @@ def convert_lightning_checkpoint( import torch logger.debug(f"Loading checkpoint from {lightning_checkpoint.resolve()}") - lckpt = torch.load(lightning_checkpoint, weights_only=False) + lckpt = torch.load(lightning_checkpoint, weights_only=False, map_location=torch.device("cpu")) now = datetime.now() formatted_date = now.strftime("%Y-%m-%d")