added an option to filter out deepbooru tags
This commit is contained in:
parent
ccaacb1891
commit
03d7b39453
|
@ -79,7 +79,9 @@ class DeepDanbooru:
|
||||||
|
|
||||||
res = []
|
res = []
|
||||||
|
|
||||||
for tag in tags:
|
filtertags = set([x.strip().replace(' ', '_') for x in shared.opts.deepbooru_filter_tags.split(",")])
|
||||||
|
|
||||||
|
for tag in [x for x in tags if x not in filtertags]:
|
||||||
probability = probability_dict[tag]
|
probability = probability_dict[tag]
|
||||||
tag_outformat = tag
|
tag_outformat = tag
|
||||||
if use_spaces:
|
if use_spaces:
|
||||||
|
|
|
@ -386,6 +386,7 @@ options_templates.update(options_section(('interrogate', "Interrogate Options"),
|
||||||
"deepbooru_sort_alpha": OptionInfo(True, "Interrogate: deepbooru sort alphabetically"),
|
"deepbooru_sort_alpha": OptionInfo(True, "Interrogate: deepbooru sort alphabetically"),
|
||||||
"deepbooru_use_spaces": OptionInfo(False, "use spaces for tags in deepbooru"),
|
"deepbooru_use_spaces": OptionInfo(False, "use spaces for tags in deepbooru"),
|
||||||
"deepbooru_escape": OptionInfo(True, "escape (\\) brackets in deepbooru (so they are used as literal brackets and not for emphasis)"),
|
"deepbooru_escape": OptionInfo(True, "escape (\\) brackets in deepbooru (so they are used as literal brackets and not for emphasis)"),
|
||||||
|
"deepbooru_filter_tags": OptionInfo("", "filter out those tags from deepbooru output (separated by comma)"),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
options_templates.update(options_section(('ui', "User interface"), {
|
options_templates.update(options_section(('ui', "User interface"), {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user