fix: add fallback value for default_max_lora_number when default_loras is empty (#2430)

This commit is contained in:
Manuel Schmid 2024-03-03 18:46:26 +01:00 committed by GitHub
parent 4ea3baff50
commit fb94394b10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -264,7 +264,7 @@ default_loras = get_config_item_or_set_default(
)
default_max_lora_number = get_config_item_or_set_default(
key='default_max_lora_number',
default_value=len(default_loras),
default_value=len(default_loras) if isinstance(default_loras, list) and len(default_loras) > 0 else 5,
validator=lambda x: isinstance(x, int) and x >= 1
)
default_cfg_scale = get_config_item_or_set_default(