feat: allow to add disabled LoRAs in config on application start (#2507)

add LoRA checkbox enable/disable handling to all necessary occurrences
This commit is contained in:
Manuel Schmid
2024-03-11 17:59:58 +01:00
committed by GitHub
parent 2831dc70a7
commit 39669453cd
8 changed files with 43 additions and 10 deletions
+6 -1
View File
@@ -275,27 +275,32 @@ default_loras = get_config_item_or_set_default(
key='default_loras',
default_value=[
[
True,
"None",
1.0
],
[
True,
"None",
1.0
],
[
True,
"None",
1.0
],
[
True,
"None",
1.0
],
[
True,
"None",
1.0
]
],
validator=lambda x: isinstance(x, list) and all(len(y) == 2 and isinstance(y[0], str) and isinstance(y[1], numbers.Number) for y in x)
validator=lambda x: isinstance(x, list) and all(len(y) == 3 and isinstance(y[0], bool) and isinstance(y[1], str) and isinstance(y[2], numbers.Number) for y in x)
)
default_max_lora_number = get_config_item_or_set_default(
key='default_max_lora_number',