summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2023-04-16 15:32:36 +0200
committerVolpeon <git@volpeon.ink>2023-04-16 15:32:36 +0200
commit3f9c6ed8b0c169d79213784463ffab962ec49419 (patch)
tree21fdc36f596972c9c2372d449bced01353438ab4 /models
parentFix (diff)
downloadtextual-inversion-diff-3f9c6ed8b0c169d79213784463ffab962ec49419.tar.gz
textual-inversion-diff-3f9c6ed8b0c169d79213784463ffab962ec49419.tar.bz2
textual-inversion-diff-3f9c6ed8b0c169d79213784463ffab962ec49419.zip
Fix
Diffstat (limited to 'models')
-rw-r--r--models/clip/embeddings.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/clip/embeddings.py b/models/clip/embeddings.py
index 8aaea8f..2b23bd3 100644
--- a/models/clip/embeddings.py
+++ b/models/clip/embeddings.py
@@ -62,7 +62,7 @@ class ManagedCLIPTextEmbeddings(CLIPTextEmbeddings):
62 token_ids = torch.tensor(token_ids, dtype=torch.long) 62 token_ids = torch.tensor(token_ids, dtype=torch.long)
63 63
64 self.token_embedding.mark_trainable(token_ids) 64 self.token_embedding.mark_trainable(token_ids)
65 self.token_embedding.weight[token_ids].data = initializer 65 self.token_embedding.weight.data[token_ids] = initializer
66 66
67 def load_embed(self, input_ids: list[int], filename: Path): 67 def load_embed(self, input_ids: list[int], filename: Path):
68 with safe_open(filename, framework="pt", device="cpu") as file: 68 with safe_open(filename, framework="pt", device="cpu") as file: