This commit is contained in:
AUTOMATIC1111 2023-11-05 19:32:21 +03:00
parent 96ee3eff6c
commit 80d639a440
3 changed files with 4 additions and 4 deletions

View File

@ -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')

View File

@ -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()

View File

@ -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"""