Skip to content

Commit

Permalink
fix extract_style_text_from_prompt #15132
Browse files Browse the repository at this point in the history
  • Loading branch information
w-e-w committed Mar 5, 2024
1 parent eee46a5 commit 706f63a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/styles.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 706f63a

Please sign in to comment.