Merge pull request #15343 from light-and-ray/escape_brackets_in_lora_random_prompt

escape brackets in lora random prompt generator
This commit is contained in:
AUTOMATIC1111 2024-03-24 05:31:33 +03:00 committed by GitHub
commit 755d2cb2e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -149,6 +149,8 @@ class LoraUserMetadataEditor(ui_extra_networks_user_metadata.UserMetadataEditor)
v = random.random() * max_count
if count > v:
for x in "({[]})":
tag = tag.replace(x, '\\' + x)
res.append(tag)
return ", ".join(sorted(res))