feat: make lora number editable in config (#2215)

* Initial commit

* Update README.md

* sync with original main Fooocus repo

* update with my gitignore setup

* add max lora config feature

* Revert "add max lora config feature"

This reverts commit cfe7463fe2.

* add max loras config feature

* Update README.md

* Update .gitignore

* update

* merge

* revert

* refactor: rename default_loras_max_number to default_max_lora_number, validate config for int

* fix: add missing patch_all call and imports again

---------

Co-authored-by: Manuel Schmid <manuel.schmid@odt.net>
This commit is contained in:
MindOfMatter
2024-02-25 21:12:26 +01:00
committed by GitHub
co-authored by Manuel Schmid
parent 468d704b29
commit 18f9f7dc31
4 changed files with 17 additions and 12 deletions
+3 -3
View File
@@ -135,16 +135,16 @@ def load_parameter_button_click(raw_prompt_txt, is_generating):
results.append(gr.update(visible=False))
for i in range(1, 6):
for i in range(1, modules.config.default_max_lora_number + 1):
try:
n, w = loaded_parameter_dict.get(f'LoRA {i}').split(' : ')
n, w = loaded_parameter_dict.get(f'LoRA {i}', ' : ').split(' : ')
w = float(w)
results.append(True)
results.append(n)
results.append(w)
except:
results.append(True)
results.append("None")
results.append('None')
results.append(1.0)
return results