refactor: use central flag for LoRA count

This commit is contained in:
Manuel Schmid
2024-01-29 14:26:56 +01:00
parent 13d0341a02
commit c3ab9f1f30
6 changed files with 11 additions and 8 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ import json
import gradio as gr
import modules.config
from modules.flags import lora_count_with_lcm
def load_parameter_button_click(raw_metadata: dict | str, is_generating: bool):
@@ -35,7 +36,7 @@ def load_parameter_button_click(raw_metadata: dict | str, is_generating: bool):
results.append(gr.update(visible=False))
for i in range(1, 6):
for i in range(1, lora_count_with_lcm):
try:
n, w = loaded_parameter_dict.get(f'LoRA {i}').split(' : ')
w = float(w)