From 724b2d8559a03fe1ad15f6bd548377af2a3c340a Mon Sep 17 00:00:00 2001 From: City <125218114+city96@users.noreply.github.com> Date: Sun, 18 Aug 2024 04:29:58 +0200 Subject: [PATCH] LoRA issue workaround Proposed by @ahiser1117 in #37 --- ops.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ops.py b/ops.py index f52faf1..4358cce 100644 --- a/ops.py +++ b/ops.py @@ -34,6 +34,8 @@ class GGMLTensor(torch.Tensor): @property def shape(self): + if not hasattr(self, "tensor_shape"): + self.tensor_shape = self.size() return self.tensor_shape class GGMLLayer(torch.nn.Module):