workaround for a mysterious bug where prompt weights can't be matched

This commit is contained in:
AUTOMATIC 2022-10-06 13:21:12 +03:00
parent 5f24b7bcf4
commit 2d3ea42a2d
1 changed files with 3 additions and 1 deletions

View File

@ -156,7 +156,9 @@ def get_multicond_prompt_list(prompts):
indexes = []
for subprompt in subprompts:
text, weight = re_weight.search(subprompt).groups()
match = re_weight.search(subprompt)
text, weight = match.groups() if match is not None else (subprompt, 1.0)
weight = float(weight) if weight is not None else 1.0