mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-06-07 21:20:49 +00:00
fix extract_style_text_from_prompt #15132
This commit is contained in:
parent
eee46a5094
commit
706f63adfa
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user