提交 2d3ea42a 编写于 作者: A AUTOMATIC

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

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册