aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorzhaohu xing <920232796@qq.com>2022-12-06 16:04:50 +0800
committerzhaohu xing <920232796@qq.com>2022-12-06 16:04:50 +0800
commit5dcc22606d05ebe5ae89c990bd83a3eb068fcb78 (patch)
treee5537714247463860ed6bcc21a40083d27ebe6c0 /modules
parenta25dfebeed5b3411f2dc0f558c2b87a7c1cda420 (diff)
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.py6
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