diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-11-05 16:31:44 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-05 16:31:44 +0000 |
commit | 96ee3eff6c8e6868e43fa57e1679603e89b89b1d (patch) | |
tree | c6e557895ff3172bad42da469a6912ac718078a1 /modules/sd_models.py | |
parent | c3699d4fd185d5a7285c5519f9bb4b6fec236d9f (diff) | |
parent | ff805d8d0eb8e3de42f04747de0d1c7354491810 (diff) | |
download | stable-diffusion-webui-gfx803-96ee3eff6c8e6868e43fa57e1679603e89b89b1d.tar.gz stable-diffusion-webui-gfx803-96ee3eff6c8e6868e43fa57e1679603e89b89b1d.tar.bz2 stable-diffusion-webui-gfx803-96ee3eff6c8e6868e43fa57e1679603e89b89b1d.zip |
Merge pull request #13865 from Gothos/master
Add support for SSD-1B
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r-- | modules/sd_models.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py index 3b6cdea1..d76dc580 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.conv_ssd(model)
+
if shared.opts.sd_checkpoint_cache > 0:
# cache newly loaded model
checkpoints_loaded[checkpoint_info] = state_dict.copy()
|