From ab38392119e9c37c7a9c3f921e0c237deb42b205 Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Tue, 20 Sep 2022 09:53:29 +0300 Subject: [PATCH] add the part that was missing for word textual inversion checksums --- modules/sd_hijack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sd_hijack.py b/modules/sd_hijack.py index 98bb9b7e..145c5ab7 100644 --- a/modules/sd_hijack.py +++ b/modules/sd_hijack.py @@ -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]