Skip to content

Commit 3e45350

Browse files
authored
fix: correctly identify and remove performance LoRA (#3150)
1 parent 55ef760 commit 3e45350

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/meta_parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def load_parameter_button_click(raw_metadata: dict | str, is_generating: bool):
6161

6262
# prevent performance LoRAs to be added twice, by performance and by lora
6363
performance_filename = None
64-
if performance is not None and performance in Performance.list():
64+
if performance is not None and performance in Performance.values():
6565
performance = Performance(performance)
6666
performance_filename = performance.lora_filename()
6767

@@ -232,7 +232,7 @@ def parse_meta_from_preset(preset_content):
232232
loras = getattr(modules.config, settings_key)
233233
if settings_key in items:
234234
loras = items[settings_key]
235-
for index, lora in enumerate(loras[:5]):
235+
for index, lora in enumerate(loras[:modules.config.default_max_lora_number]):
236236
preset_prepared[f'lora_combined_{index + 1}'] = ' : '.join(map(str, lora))
237237
elif settings_key == "default_aspect_ratio":
238238
if settings_key in items and items[settings_key] is not None:

0 commit comments

Comments
 (0)