mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-11-27 06:40:10 +08:00
add a possible fix for 'LatentDiffusion' object has no attribute 'lora_layer_mapping'
This commit is contained in:
parent
d7e9ac2aff
commit
b9abdb50a3
@ -9,6 +9,7 @@
|
||||
* allow bf16 in safe unpickler (resolves problems with loading some loras)
|
||||
* allow web UI to be ran fully offline
|
||||
* fix localizations not working
|
||||
* fix error for loras: 'LatentDiffusion' object has no attribute 'lora_layer_mapping'
|
||||
|
||||
## 1.2.0
|
||||
|
||||
|
@ -133,6 +133,10 @@ def load_lora(name, filename):
|
||||
|
||||
sd = sd_models.read_state_dict(filename)
|
||||
|
||||
# this should not be needed but is here as an emergency fix for an unknown error people are experiencing in 1.2.0
|
||||
if not hasattr(shared.sd_model, 'lora_layer_mapping'):
|
||||
assign_lora_names_to_compvis_modules(shared.sd_model)
|
||||
|
||||
keys_failed_to_match = {}
|
||||
is_sd2 = 'model_transformer_resblocks' in shared.sd_model.lora_layer_mapping
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user