diff --git a/modules/styles.py b/modules/styles.py index 60bd8a7fb0139a106911e8a90e736b47a5c2ed9a..a9d8636a98d4dd13cc03c79e67720e0b7cf3019b 100644 --- a/modules/styles.py +++ b/modules/styles.py @@ -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