Commit 2d3ea42a authored by AUTOMATIC's avatar AUTOMATIC

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

parent 5f24b7bc
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment