AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
143.29k stars 26.99k forks source link

fix passing of literal backslash #16671

Closed w-e-w closed 1 day ago

w-e-w commented 1 day ago

Description

in that PR I forgot to account for literal escape character \\ (double backslash) \\ or even number of \\ like \\\\ is literal \ and not be treated as escape character

https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/82a973c04367123ae98bd9abdf80d9eda9b910e2/modules/prompt_parser.py#L381

Screenshots/videos:

current after #16669 notice that it dose not cycle between error and pass as \ is added

https://github.com/user-attachments/assets/ca3fa8d3-1df7-4feb-b215-3f094158bfc5

this PR correctly psychos between error and pass as \ is added

https://github.com/user-attachments/assets/746da735-f8e6-4b8c-837a-401fde6acdd9

Checklist: