summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2023-04-15 13:47:01 +0200
committerVolpeon <git@volpeon.ink>2023-04-15 13:47:01 +0200
commitfa42b1656b6d55f2e405ca540519b1ac64df9411 (patch)
tree93e8e8a54375a10e200ea5dd6f05d2a6904f7106
parentFix (diff)
downloadtextual-inversion-diff-fa42b1656b6d55f2e405ca540519b1ac64df9411.tar.gz
textual-inversion-diff-fa42b1656b6d55f2e405ca540519b1ac64df9411.tar.bz2
textual-inversion-diff-fa42b1656b6d55f2e405ca540519b1ac64df9411.zip
Fix
-rw-r--r--models/lora.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/lora.py b/models/lora.py
index 98d4d2c..89c4b2e 100644
--- a/models/lora.py
+++ b/models/lora.py
@@ -78,7 +78,7 @@ class LoraEmbedding(nn.Embedding, LoraLayer):
78 78
79 def mark_trainable(self, input_ids): 79 def mark_trainable(self, input_ids):
80 trainable_ids = self.trainable_ids[input_ids] 80 trainable_ids = self.trainable_ids[input_ids]
81 new_ids = trainable_ids[trainable_ids == -1] 81 new_ids = input_ids[trainable_ids == -1]
82 82
83 if new_ids.shape[0] == 0: 83 if new_ids.shape[0] == 0:
84 return 84 return