From fb94394b10807b4ae23d21fe69e703dc85abae94 Mon Sep 17 00:00:00 2001 From: Manuel Schmid <9307310+mashb1t@users.noreply.github.com> Date: Sun, 3 Mar 2024 18:46:26 +0100 Subject: [PATCH] fix: add fallback value for default_max_lora_number when default_loras is empty (#2430) --- modules/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/config.py b/modules/config.py index 09c8fd7c..a68bd218 100644 --- a/modules/config.py +++ b/modules/config.py @@ -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(