mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-02-04 04:32:57 +08:00
Update dataset.py
This commit is contained in:
parent
b19af67d29
commit
a1e271207d
@ -100,7 +100,7 @@ class PersonalizedBase(Dataset):
|
|||||||
text = text.replace("[name]", self.placeholder_token)
|
text = text.replace("[name]", self.placeholder_token)
|
||||||
tags = filename_text.split(',')
|
tags = filename_text.split(',')
|
||||||
if shared.opts.tag_drop_out != 0:
|
if shared.opts.tag_drop_out != 0:
|
||||||
tags = [t for t in tags if random.random() > shared.opt.tag_drop_out]
|
tags = [t for t in tags if random.random() > shared.opts.tag_drop_out]
|
||||||
if shared.opts.shuffle_tags:
|
if shared.opts.shuffle_tags:
|
||||||
random.shuffle(tags)
|
random.shuffle(tags)
|
||||||
text = text.replace("[filewords]", ','.join(tags))
|
text = text.replace("[filewords]", ','.join(tags))
|
||||||
|
Loading…
Reference in New Issue
Block a user