workaround for a mysterious bug where prompt weights can't be matched
This commit is contained in:
parent
5f24b7bcf4
commit
2d3ea42a2d
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue