Commit 721c4309 authored by Andray's avatar Andray

escape brackets in lora random prompt generator

parent 57727e55
...@@ -149,6 +149,8 @@ class LoraUserMetadataEditor(ui_extra_networks_user_metadata.UserMetadataEditor) ...@@ -149,6 +149,8 @@ class LoraUserMetadataEditor(ui_extra_networks_user_metadata.UserMetadataEditor)
v = random.random() * max_count v = random.random() * max_count
if count > v: if count > v:
for x in "({[]})":
tag = tag.replace(x, '\\' + x)
res.append(tag) res.append(tag)
return ", ".join(sorted(res)) return ", ".join(sorted(res))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment