diff options
author | zhaohu xing <920232796@qq.com> | 2022-12-06 08:04:50 +0000 |
---|---|---|
committer | zhaohu xing <920232796@qq.com> | 2022-12-06 08:04:50 +0000 |
commit | 5dcc22606d05ebe5ae89c990bd83a3eb068fcb78 (patch) | |
tree | e5537714247463860ed6bcc21a40083d27ebe6c0 /modules | |
parent | a25dfebeed5b3411f2dc0f558c2b87a7c1cda420 (diff) | |
download | stable-diffusion-webui-gfx803-5dcc22606d05ebe5ae89c990bd83a3eb068fcb78.tar.gz stable-diffusion-webui-gfx803-5dcc22606d05ebe5ae89c990bd83a3eb068fcb78.tar.bz2 stable-diffusion-webui-gfx803-5dcc22606d05ebe5ae89c990bd83a3eb068fcb78.zip |
add hash and fix undo hijack bug
Signed-off-by: zhaohu xing <920232796@qq.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/sd_hijack.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/sd_hijack.py b/modules/sd_hijack.py index 9b5890e7..9fed1b6f 100644 --- a/modules/sd_hijack.py +++ b/modules/sd_hijack.py @@ -112,7 +112,11 @@ class StableDiffusionModelHijack: self.layers = flatten(m)
def undo_hijack(self, m):
- if type(m.cond_stage_model) == sd_hijack_clip.FrozenCLIPEmbedderWithCustomWords:
+
+ if shared.text_model_name == "XLMR-Large":
+ m.cond_stage_model = m.cond_stage_model.wrapped
+
+ elif type(m.cond_stage_model) == sd_hijack_clip.FrozenCLIPEmbedderWithCustomWords:
m.cond_stage_model = m.cond_stage_model.wrapped
model_embeddings = m.cond_stage_model.transformer.text_model.embeddings
|