mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
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:
co-authored by
Manuel Schmid
parent
468d704b29
commit
18f9f7dc31
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user