add the part that was missing for word textual inversion checksums

This commit is contained in:
AUTOMATIC 2022-09-20 09:53:29 +03:00
parent 06e076e48a
commit ab38392119
1 changed files with 1 additions and 1 deletions

View File

@ -218,7 +218,7 @@ class StableDiffusionModelHijack:
emb = emb.unsqueeze(0)
self.word_embeddings[name] = emb.detach()
self.word_embeddings_checksums[name] = f'{const_hash(emb.reshape(-1))&0xffff:04x}'
self.word_embeddings_checksums[name] = f'{const_hash(emb.reshape(-1)*100)&0xffff:04x}'
ids = tokenizer([name], add_special_tokens=False)['input_ids'][0]