From dc86fc92ce99af7c0f850a14bc4de845dd917c05 Mon Sep 17 00:00:00 2001 From: Damian at mba Date: Thu, 27 Oct 2022 19:01:54 +0200 Subject: [PATCH] fix crash parsing empty prompt "" --- ldm/invoke/prompt_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ldm/invoke/prompt_parser.py b/ldm/invoke/prompt_parser.py index 7613c9d93e..8807c7986b 100644 --- a/ldm/invoke/prompt_parser.py +++ b/ldm/invoke/prompt_parser.py @@ -250,7 +250,7 @@ class PromptParser(): def parse_legacy_blend(self, text: str) -> Optional[Blend]: weighted_subprompts = split_weighted_subprompts(text, skip_normalize=False) - if len(weighted_subprompts) == 1: + if len(weighted_subprompts) <= 1: return None strings = [x[0] for x in weighted_subprompts] weights = [x[1] for x in weighted_subprompts]