aboutsummaryrefslogtreecommitdiff
path: root/extensions-builtin/Lora/lora.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-05-14 13:36:16 +0300
committerAUTOMATIC <16777216c@gmail.com>2023-05-14 13:36:16 +0300
commit7001e1ed61ad10f56864002271d4d5c7b086ada1 (patch)
tree8d756469c81101055b52c9cd15c856ec49bafdeb /extensions-builtin/Lora/lora.py
parent1a43524018ea3e64b93be2abc2a49b6159515442 (diff)
parent89f9faa63388756314e8a1d96cf86bf5e0663045 (diff)
Merge branch 'master' into dev
Diffstat (limited to 'extensions-builtin/Lora/lora.py')
-rw-r--r--extensions-builtin/Lora/lora.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/extensions-builtin/Lora/lora.py b/extensions-builtin/Lora/lora.py
index 1a5b3c2d..1308c48b 100644
--- a/extensions-builtin/Lora/lora.py
+++ b/extensions-builtin/Lora/lora.py
@@ -132,6 +132,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