aboutsummaryrefslogtreecommitdiffstats
path: root/modules/sd_models.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r--modules/sd_models.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py
index 930d0bee..ef96d29d 100644
--- a/modules/sd_models.py
+++ b/modules/sd_models.py
@@ -346,10 +346,14 @@ 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)
+
model.load_state_dict(state_dict, strict=False)
timer.record("apply weights to model")