Skip to content

Commit 335d156

Browse files
committed
update
1 parent d7db7d8 commit 335d156

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

mikazuki/tagger/interrogator.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ def postprocess_tags(
4848

4949
# filter tags
5050
if (
51-
c >= threshold
52-
and t not in exclude_tags
51+
c >= threshold
52+
and t not in exclude_tags
5353
)
5454
}
5555

@@ -202,14 +202,18 @@ def interrogate(
202202

203203

204204
available_interrogators = {
205-
"wd14-convnextv2-v2": WaifuDiffusionInterrogator(
205+
'wd14-convnextv2-v2': WaifuDiffusionInterrogator(
206206
'wd14-convnextv2-v2', repo_id='SmilingWolf/wd-v1-4-convnextv2-tagger-v2',
207207
revision='v2.0'
208208
),
209-
"wd14-swinv2-v2": WaifuDiffusionInterrogator(
209+
'wd14-swinv2-v2': WaifuDiffusionInterrogator(
210210
'wd14-swinv2-v2', repo_id='SmilingWolf/wd-v1-4-swinv2-tagger-v2',
211211
revision='v2.0'
212212
),
213+
'wd14-vit-v2': WaifuDiffusionInterrogator(
214+
'wd14-vit-v2', repo_id='SmilingWolf/wd-v1-4-vit-tagger-v2',
215+
revision='v2.0'
216+
),
213217
}
214218

215219

@@ -239,7 +243,6 @@ def on_interrogate(
239243

240244
unload_model_after_running: bool
241245
):
242-
243246
postprocess_opts = (
244247
threshold,
245248
split_str(additional_tags),
@@ -269,7 +272,7 @@ def on_interrogate(
269272

270273
# check the input directory path
271274
if not os.path.isdir(base_dir):
272-
print("input path is not a directory / 输入的路径不是文件夹,终止识别")
275+
print('input path is not a directory / 输入的路径不是文件夹,终止识别')
273276
return 'input path is not a directory'
274277

275278
# this line is moved here because some reason
@@ -375,5 +378,4 @@ def on_interrogate(
375378
if unload_model_after_running:
376379
interrogator.unload()
377380

378-
return "Succeed"
379-
381+
return 'Succeed'

0 commit comments

Comments
 (0)