未验证 提交 14215beb 编写于 作者: A AUTOMATIC1111 提交者: GitHub

Merge pull request #15135 from AUTOMATIC1111/fix-extract_style_text_from_prompt

fix extract_style_text_from_prompt #15132
......@@ -42,7 +42,7 @@ def extract_style_text_from_prompt(style_text, prompt):
stripped_style_text = style_text.strip()
if "{prompt}" in stripped_style_text:
left, right = stripped_style_text.split("{prompt}", 2)
left, _, right = stripped_style_text.partition("{prompt}")
if stripped_prompt.startswith(left) and stripped_prompt.endswith(right):
prompt = stripped_prompt[len(left):len(stripped_prompt)-len(right)]
return True, prompt
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册