diff options
author | Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com> | 2023-11-16 13:53:13 +0000 |
---|---|---|
committer | Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com> | 2023-11-16 13:53:13 +0000 |
commit | cd12256575dcce325519ef674323d953fbce252c (patch) | |
tree | 61cb8998f8971cbdbd3302ff1b7edda6e2737b99 /modules/sd_models.py | |
parent | c3facab495e6bb29b5e0b16d064b44851a733a95 (diff) | |
parent | 5e80d9ee99c5899e5e2b130408ffb65a0585a62a (diff) | |
download | stable-diffusion-webui-gfx803-cd12256575dcce325519ef674323d953fbce252c.tar.gz stable-diffusion-webui-gfx803-cd12256575dcce325519ef674323d953fbce252c.tar.bz2 stable-diffusion-webui-gfx803-cd12256575dcce325519ef674323d953fbce252c.zip |
Merge branch 'dev' into test-fp8
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r-- | modules/sd_models.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py index 31bcb913..a6c8b2fa 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -352,10 +352,13 @@ def load_model_weights(model, checkpoint_info: CheckpointInfo, state_dict, timer model.is_sdxl = hasattr(model, 'conditioner')
model.is_sd2 = not model.is_sdxl and hasattr(model.cond_stage_model, 'model')
model.is_sd1 = not model.is_sdxl and not model.is_sd2
-
+ model.is_ssd = model.is_sdxl and 'model.diffusion_model.middle_block.1.transformer_blocks.0.attn1.to_q.weight' not in state_dict.keys()
if model.is_sdxl:
sd_models_xl.extend_sdxl(model)
+ if model.is_ssd:
+ sd_hijack.model_hijack.convert_sdxl_to_ssd(model)
+
if shared.opts.sd_checkpoint_cache > 0:
# cache newly loaded model
checkpoints_loaded[checkpoint_info] = state_dict.copy()
|