diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-11-05 16:32:21 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-11-05 16:32:21 +0000 |
commit | 80d639a440929e9effe4620ce74333de283e7efc (patch) | |
tree | 4183d8acef3b94182e1c622cdea59840be933d8e /modules | |
parent | 96ee3eff6c8e6868e43fa57e1679603e89b89b1d (diff) | |
download | stable-diffusion-webui-gfx803-80d639a440929e9effe4620ce74333de283e7efc.tar.gz stable-diffusion-webui-gfx803-80d639a440929e9effe4620ce74333de283e7efc.tar.bz2 stable-diffusion-webui-gfx803-80d639a440929e9effe4620ce74333de283e7efc.zip |
linter
Diffstat (limited to 'modules')
-rw-r--r-- | modules/sd_hijack.py | 2 | ||||
-rw-r--r-- | modules/sd_models.py | 4 | ||||
-rw-r--r-- | modules/sd_models_types.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/modules/sd_hijack.py b/modules/sd_hijack.py index 4fff418d..c6d17764 100644 --- a/modules/sd_hijack.py +++ b/modules/sd_hijack.py @@ -183,7 +183,7 @@ class StableDiffusionModelHijack: except Exception as e:
errors.display(e, "applying cross attention optimization")
undo_optimizations()
-
+
def conv_ssd(self, m):
delattr(m.model.diffusion_model.middle_block, '1')
delattr(m.model.diffusion_model.middle_block, '2')
diff --git a/modules/sd_models.py b/modules/sd_models.py index d76dc580..1036a3b1 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -355,10 +355,10 @@ def load_model_weights(model, checkpoint_info: CheckpointInfo, state_dict, timer 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()
diff --git a/modules/sd_models_types.py b/modules/sd_models_types.py index 1f28942a..f911fbb6 100644 --- a/modules/sd_models_types.py +++ b/modules/sd_models_types.py @@ -23,7 +23,7 @@ class WebuiSdModel(LatentDiffusion): is_sdxl: bool
"""True if the model's architecture is SDXL or SSD"""
-
+
is_ssd: bool
"""True if the model is SSD"""
|