escape brackets in lora random prompt generator

This commit is contained in:
Andray 2024-03-21 16:29:51 +04:00
parent 57727e554d
commit 721c4309c2
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))