From 5a0f745ed676c9f72aa82c38e724c2425093f6d0 Mon Sep 17 00:00:00 2001 From: hako-mikan <122196982+hako-mikan@users.noreply.github.com> Date: Wed, 22 Jan 2025 19:34:11 +0900 Subject: [PATCH] fix load keys in forge --- scripts/supermerger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/supermerger.py b/scripts/supermerger.py index 7a15a95..4ba39f9 100644 --- a/scripts/supermerger.py +++ b/scripts/supermerger.py @@ -1063,7 +1063,7 @@ def modeltype(sd): def loadkeys(model_a, lora): if lora: import lora - sd = sd_models.read_state_dict(lora.available_loras[model_a].filename,"cpu") + sd = load_torch_file(lora.available_loras[model_a].filename, device = torch.device("cpu")) if forge else sd_models.read_state_dict(lora.available_loras[model_a].filename,"cpu") else: sd = loadmodel(model_a) keys = []