diff options
author | ezxzeng <zhixuan.zeng@gmail.com> | 2023-11-07 20:25:27 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-07 20:25:27 +0000 |
commit | f9c14a8c8c8b682c2a7f7a11306b26e2a28ebeec (patch) | |
tree | 1c7f6abc11bd2aacd2a0d16a0b7db1963c9b26cd /modules/sd_models.py | |
parent | 759515316e8ec536f34fad616e8c6a33674a164b (diff) | |
parent | 5e80d9ee99c5899e5e2b130408ffb65a0585a62a (diff) | |
download | stable-diffusion-webui-gfx803-f9c14a8c8c8b682c2a7f7a11306b26e2a28ebeec.tar.gz stable-diffusion-webui-gfx803-f9c14a8c8c8b682c2a7f7a11306b26e2a28ebeec.tar.bz2 stable-diffusion-webui-gfx803-f9c14a8c8c8b682c2a7f7a11306b26e2a28ebeec.zip |
Merge branch 'dev' into ui_mobile_optimizations
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 3b6cdea1..841402e8 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()
|