From 2a5ae9520f82aea1aca1c4d735182009eb086224 Mon Sep 17 00:00:00 2001 From: AIrjen Date: Mon, 22 Jan 2024 21:09:00 +0100 Subject: [PATCH] hotfix Issue sometimes with empty list being adress in prompt enhander --- build_dynamic_prompt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build_dynamic_prompt.py b/build_dynamic_prompt.py index 91e4d77..4092734 100644 --- a/build_dynamic_prompt.py +++ b/build_dynamic_prompt.py @@ -3987,7 +3987,8 @@ def enhance_positive(positive_prompt = "", amountofwords = 3): # remove and only take one combiwords2 = [word for word in combiwords2 if word not in allwords] #for combiword2 in combiwords2: - newwordlist.append(random.choice(combiwords2)) + if(combiwords2): + newwordlist.append(random.choice(combiwords2))