diff options
author | MrCheeze <fishycheeze@yahoo.ca> | 2022-12-11 15:19:46 +0000 |
---|---|---|
committer | MrCheeze <fishycheeze@yahoo.ca> | 2022-12-11 16:18:34 +0000 |
commit | ec0a48826fb41c1b1baab45a9030f7eb55568fd0 (patch) | |
tree | 0aad5a4e2c7efd7630d0392ae0278c13e0cc7676 /modules/sd_models.py | |
parent | bd81a09eacf02dad095b98094ab936f276d0343f (diff) | |
download | stable-diffusion-webui-gfx803-ec0a48826fb41c1b1baab45a9030f7eb55568fd0.tar.gz stable-diffusion-webui-gfx803-ec0a48826fb41c1b1baab45a9030f7eb55568fd0.tar.bz2 stable-diffusion-webui-gfx803-ec0a48826fb41c1b1baab45a9030f7eb55568fd0.zip |
unconditionally set use_ema=False if value not specified (True never worked, and all configs except v1-inpainting-inference.yaml already correctly set it to False)
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r-- | modules/sd_models.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py index b64f573f..f36b299f 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -293,7 +293,6 @@ def load_model(checkpoint_info=None): if should_hijack_inpainting(checkpoint_info):
# Hardcoded config for now...
sd_config.model.target = "ldm.models.diffusion.ddpm.LatentInpaintDiffusion"
- sd_config.model.params.use_ema = False
sd_config.model.params.conditioning_key = "hybrid"
sd_config.model.params.unet_config.params.in_channels = 9
sd_config.model.params.finetune_keys = None
@@ -301,6 +300,9 @@ def load_model(checkpoint_info=None): # 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"))
+ if not hasattr(sd_config.model.params, "use_ema"):
+ sd_config.model.params.use_ema = False
+
do_inpainting_hijack()
if shared.cmd_opts.no_half:
|