summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
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: