Skip to content

Commit

Permalink
fix extract_style_text_from_prompt AUTOMATIC1111#15132
Browse files Browse the repository at this point in the history
  • Loading branch information
w-e-w authored and ruchej committed Sep 30, 2024
1 parent c5ae936 commit 9bf9baf
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 9bf9baf

Please sign in to comment.