aboutsummaryrefslogtreecommitdiffstats
path: root/modules/sd_hijack.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-09-20 06:53:29 +0000
committerAUTOMATIC <16777216c@gmail.com>2022-09-20 06:53:29 +0000
commitab38392119e9c37c7a9c3f921e0c237deb42b205 (patch)
treed5f4f9abc9c5621e47e2f966459239899bd4a941 /modules/sd_hijack.py
parent06e076e48af3b7111ff854f26820b90b5ca1cc5d (diff)
downloadstable-diffusion-webui-gfx803-ab38392119e9c37c7a9c3f921e0c237deb42b205.tar.gz
stable-diffusion-webui-gfx803-ab38392119e9c37c7a9c3f921e0c237deb42b205.tar.bz2
stable-diffusion-webui-gfx803-ab38392119e9c37c7a9c3f921e0c237deb42b205.zip
add the part that was missing for word textual inversion checksums
Diffstat (limited to 'modules/sd_hijack.py')
-rw-r--r--modules/sd_hijack.py2
1 files changed, 1 insertions, 1 deletions
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]