aboutsummaryrefslogtreecommitdiff
path: root/modules/sd_models.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2022-12-24 09:53:44 +0300
committerGitHub <noreply@github.com>2022-12-24 09:53:44 +0300
commit94450b88775ee14392d05ef6a8fc915b93946b9e (patch)
tree800b9b28660402d53f1baca8adb30f8d0f1ab6e5 /modules/sd_models.py
parent9441c28c947588d756e279a8cd5db6c0b4a8d2e4 (diff)
parentec0a48826fb41c1b1baab45a9030f7eb55568fd0 (diff)
Merge pull request #5589 from MrCheeze/better-special-model-support
Better support for 2.0-inpainting and 2.0-depth special models
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r--modules/sd_models.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py
index 5b37f3fe..f36b299f 100644
--- a/modules/sd_models.py
+++ b/modules/sd_models.py
@@ -293,13 +293,16 @@ 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
# 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: