mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-02-17 15:49:47 +08:00
linter
This commit is contained in:
parent
96ee3eff6c
commit
80d639a440
@ -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')
|
||||
|
@ -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()
|
||||
|
@ -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"""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user