mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-04-25 06:19:00 +08:00
linter
This commit is contained in:
parent
96ee3eff6c
commit
80d639a440
@ -183,7 +183,7 @@ class StableDiffusionModelHijack:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
errors.display(e, "applying cross attention optimization")
|
errors.display(e, "applying cross attention optimization")
|
||||||
undo_optimizations()
|
undo_optimizations()
|
||||||
|
|
||||||
def conv_ssd(self, m):
|
def conv_ssd(self, m):
|
||||||
delattr(m.model.diffusion_model.middle_block, '1')
|
delattr(m.model.diffusion_model.middle_block, '1')
|
||||||
delattr(m.model.diffusion_model.middle_block, '2')
|
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()
|
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:
|
if model.is_sdxl:
|
||||||
sd_models_xl.extend_sdxl(model)
|
sd_models_xl.extend_sdxl(model)
|
||||||
|
|
||||||
if model.is_ssd:
|
if model.is_ssd:
|
||||||
sd_hijack.model_hijack.conv_ssd(model)
|
sd_hijack.model_hijack.conv_ssd(model)
|
||||||
|
|
||||||
if shared.opts.sd_checkpoint_cache > 0:
|
if shared.opts.sd_checkpoint_cache > 0:
|
||||||
# cache newly loaded model
|
# cache newly loaded model
|
||||||
checkpoints_loaded[checkpoint_info] = state_dict.copy()
|
checkpoints_loaded[checkpoint_info] = state_dict.copy()
|
||||||
|
@ -23,7 +23,7 @@ class WebuiSdModel(LatentDiffusion):
|
|||||||
|
|
||||||
is_sdxl: bool
|
is_sdxl: bool
|
||||||
"""True if the model's architecture is SDXL or SSD"""
|
"""True if the model's architecture is SDXL or SSD"""
|
||||||
|
|
||||||
is_ssd: bool
|
is_ssd: bool
|
||||||
"""True if the model is SSD"""
|
"""True if the model is SSD"""
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user