From 89d0aec0420f45718bc7f960134e7237dd4c9712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sigbj=C3=B8rn=20Skj=C3=A6ret?= Date: Sun, 15 Mar 2026 12:15:12 +0100 Subject: [PATCH] convert : support contiguous method on lora tensors (#20489) --- convert_lora_to_gguf.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/convert_lora_to_gguf.py b/convert_lora_to_gguf.py index b0adde8a8b..871ce82422 100755 --- a/convert_lora_to_gguf.py +++ b/convert_lora_to_gguf.py @@ -128,6 +128,12 @@ class LoraTorchTensor: assert dim is None return self.shape + def contiguous(self) -> LoraTorchTensor: + return LoraTorchTensor( + self._lora_A.contiguous(), + self._lora_B.contiguous(), + ) + def reshape(self, *shape: int | tuple[int, ...]) -> LoraTorchTensor: if isinstance(shape[0], tuple): new_shape: tuple[int, ...] = shape[0]