fix crash parsing empty prompt ""

This commit is contained in:
Damian at mba 2022-10-27 19:01:54 +02:00
parent 16e7cbdb38
commit dc86fc92ce

View File

@ -250,7 +250,7 @@ class PromptParser():
def parse_legacy_blend(self, text: str) -> Optional[Blend]: def parse_legacy_blend(self, text: str) -> Optional[Blend]:
weighted_subprompts = split_weighted_subprompts(text, skip_normalize=False) weighted_subprompts = split_weighted_subprompts(text, skip_normalize=False)
if len(weighted_subprompts) == 1: if len(weighted_subprompts) <= 1:
return None return None
strings = [x[0] for x in weighted_subprompts] strings = [x[0] for x in weighted_subprompts]
weights = [x[1] for x in weighted_subprompts] weights = [x[1] for x in weighted_subprompts]