aboutsummaryrefslogtreecommitdiff
path: root/modules/sd_models.py
diff options
context:
space:
mode:
authorrandom_thoughtss <random_thoughtss@proton.me>2022-10-20 13:28:43 -0700
committerrandom_thoughtss <random_thoughtss@proton.me>2022-10-20 13:28:43 -0700
commit708c3a7bd8ce68cbe1aa7c268e5a4b1980affc9f (patch)
tree44b9ec9255b5dec7b9b0536029379070be15633d /modules/sd_models.py
parent92a17a7a4a13fceb3c3e25a2e854b2a7dd6eb5df (diff)
Added PLMS hijack and made sure to always replace methods
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r--modules/sd_models.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py
index 47836d25..7072db08 100644
--- a/modules/sd_models.py
+++ b/modules/sd_models.py
@@ -214,8 +214,6 @@ def load_model():
sd_config = OmegaConf.load(checkpoint_info.config)
if should_hijack_inpainting(checkpoint_info):
- do_inpainting_hijack()
-
# Hardcoded config for now...
sd_config.model.target = "ldm.models.diffusion.ddpm.LatentInpaintDiffusion"
sd_config.model.params.use_ema = False
@@ -225,6 +223,7 @@ def load_model():
# Create a "fake" config with a different name so that we know to unload it when switching models.
checkpoint_info = checkpoint_info._replace(config=checkpoint_info.config.replace(".yaml", "-inpainting.yaml"))
+ do_inpainting_hijack()
sd_model = instantiate_from_config(sd_config.model)
load_model_weights(sd_model, checkpoint_info)