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

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))