From e69e068b57976e58e2722d74599d66c783a06a41 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Mon, 27 Oct 2025 21:02:59 +0200 Subject: [PATCH] Update gguf.py --- gguf/gguf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gguf/gguf.py b/gguf/gguf.py index 41f37bd..fa24023 100644 --- a/gguf/gguf.py +++ b/gguf/gguf.py @@ -121,6 +121,9 @@ class GGUFLinear(nn.Linear): continue elif lora_strength == 0.0: continue + if len(lora_diff) == 1: + weight = weight.add(lora_diff[0].to(weight.device), alpha=lora_strength) + continue patch_diff = torch.mm( lora_diff[0].flatten(start_dim=1).to(weight.device), lora_diff[1].flatten(start_dim=1).to(weight.device)