From b7c5e6039e3a60dfd0b4df342782fabdf6844a16 Mon Sep 17 00:00:00 2001 From: Seunghoon Lee Date: Fri, 19 Apr 2024 10:09:47 +0900 Subject: [PATCH] Fix #449. --- modules/dml/hijack/torch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/dml/hijack/torch.py b/modules/dml/hijack/torch.py index 3eb6c2a019c..e4913a3577d 100644 --- a/modules/dml/hijack/torch.py +++ b/modules/dml/hijack/torch.py @@ -52,7 +52,7 @@ def pow_(self: torch.Tensor, *args, **kwargs): _load = torch.load -def load(f, map_location, *args, **kwargs): +def load(f, map_location = "cpu", *args, **kwargs): if type(map_location) in (str, torch.device,): device = torch.device(map_location) if device.type == "privateuseone":