aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryfzhou <zhougynui@sina.com>2023-07-19 09:53:28 +0000
committerGitHub <noreply@github.com>2023-07-19 09:53:28 +0000
commitcb7573489670cc7a042d24285e158b797c9558b2 (patch)
tree668efe71b0e0c73fa96de0928b166cdf83497bf7
parentf865d3e11647dfd6c7b2cdf90dde24680e58acd8 (diff)
downloadstable-diffusion-webui-gfx803-cb7573489670cc7a042d24285e158b797c9558b2.tar.gz
stable-diffusion-webui-gfx803-cb7573489670cc7a042d24285e158b797c9558b2.tar.bz2
stable-diffusion-webui-gfx803-cb7573489670cc7a042d24285e158b797c9558b2.zip
【bug】reload altclip model error
When using BertSeriesModelWithTransformation as the cond_stage_model, the undo_hijack should be performed using the FrozenXLMREmbedderWithCustomWords type; otherwise, it will result in a failed model reload.
-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 3b6f95ce..928233ab 100644
--- a/modules/sd_hijack.py
+++ b/modules/sd_hijack.py
@@ -203,7 +203,7 @@ class StableDiffusionModelHijack:
ldm.modules.diffusionmodules.openaimodel.UNetModel.forward = sd_unet.UNetModel_forward
def undo_hijack(self, m):
- if type(m.cond_stage_model) == xlmr.BertSeriesModelWithTransformation:
+ if type(m.cond_stage_model) == sd_hijack_xlmr.FrozenXLMREmbedderWithCustomWords:
m.cond_stage_model = m.cond_stage_model.wrapped
elif type(m.cond_stage_model) == sd_hijack_clip.FrozenCLIPEmbedderWithCustomWords: