Skip to content

Commit

Permalink
Merge pull request #15343 from light-and-ray/escape_brackets_in_lora_…
Browse files Browse the repository at this point in the history
…random_prompt

escape brackets in lora random prompt generator
  • Loading branch information
AUTOMATIC1111 committed Mar 24, 2024
2 parents 0affa24 + 721c430 commit 755d2cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions extensions-builtin/Lora/ui_edit_user_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ def generate_random_prompt_from_tags(self, tags):

v = random.random() * max_count
if count > v:
for x in "({[]})":
tag = tag.replace(x, '\\' + x)
res.append(tag)

return ", ".join(sorted(res))
Expand Down

0 comments on commit 755d2cb

Please sign in to comment.