diff options
author | brkirch <brkirch@users.noreply.github.com> | 2023-02-07 05:05:54 +0000 |
---|---|---|
committer | brkirch <brkirch@users.noreply.github.com> | 2023-02-08 03:53:45 +0000 |
commit | 2016733814433ca2b69d10764bfa0ab4c7088782 (patch) | |
tree | ce7bc91d6f8d19ca403d6f4ed633887c6d5e4132 /modules/sd_hijack.py | |
parent | 4738486d8f528a98a525970ac06a109431fd7344 (diff) | |
download | stable-diffusion-webui-gfx803-2016733814433ca2b69d10764bfa0ab4c7088782.tar.gz stable-diffusion-webui-gfx803-2016733814433ca2b69d10764bfa0ab4c7088782.tar.bz2 stable-diffusion-webui-gfx803-2016733814433ca2b69d10764bfa0ab4c7088782.zip |
Apply hijacks in ddpm_edit for upcast sampling
To avoid import errors, ddpm_edit hijacks are done after an instruct pix2pix model is loaded.
Diffstat (limited to 'modules/sd_hijack.py')
-rw-r--r-- | modules/sd_hijack.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/sd_hijack.py b/modules/sd_hijack.py index 8fdc5990..fca418cd 100644 --- a/modules/sd_hijack.py +++ b/modules/sd_hijack.py @@ -104,6 +104,9 @@ class StableDiffusionModelHijack: m.cond_stage_model.model.token_embedding = EmbeddingsWithFixes(m.cond_stage_model.model.token_embedding, self)
m.cond_stage_model = sd_hijack_open_clip.FrozenOpenCLIPEmbedderWithCustomWords(m.cond_stage_model, self)
+ if m.cond_stage_key == "edit":
+ sd_hijack_unet.hijack_ddpm_edit()
+
self.optimization_method = apply_optimizations()
self.clip = m.cond_stage_model
|