@@ -48,8 +48,8 @@ def postprocess_tags(
48
48
49
49
# filter tags
50
50
if (
51
- c >= threshold
52
- and t not in exclude_tags
51
+ c >= threshold
52
+ and t not in exclude_tags
53
53
)
54
54
}
55
55
@@ -202,14 +202,18 @@ def interrogate(
202
202
203
203
204
204
available_interrogators = {
205
- " wd14-convnextv2-v2" : WaifuDiffusionInterrogator (
205
+ ' wd14-convnextv2-v2' : WaifuDiffusionInterrogator (
206
206
'wd14-convnextv2-v2' , repo_id = 'SmilingWolf/wd-v1-4-convnextv2-tagger-v2' ,
207
207
revision = 'v2.0'
208
208
),
209
- " wd14-swinv2-v2" : WaifuDiffusionInterrogator (
209
+ ' wd14-swinv2-v2' : WaifuDiffusionInterrogator (
210
210
'wd14-swinv2-v2' , repo_id = 'SmilingWolf/wd-v1-4-swinv2-tagger-v2' ,
211
211
revision = 'v2.0'
212
212
),
213
+ 'wd14-vit-v2' : WaifuDiffusionInterrogator (
214
+ 'wd14-vit-v2' , repo_id = 'SmilingWolf/wd-v1-4-vit-tagger-v2' ,
215
+ revision = 'v2.0'
216
+ ),
213
217
}
214
218
215
219
@@ -239,7 +243,6 @@ def on_interrogate(
239
243
240
244
unload_model_after_running : bool
241
245
):
242
-
243
246
postprocess_opts = (
244
247
threshold ,
245
248
split_str (additional_tags ),
@@ -269,7 +272,7 @@ def on_interrogate(
269
272
270
273
# check the input directory path
271
274
if not os .path .isdir (base_dir ):
272
- print (" input path is not a directory / 输入的路径不是文件夹,终止识别" )
275
+ print (' input path is not a directory / 输入的路径不是文件夹,终止识别' )
273
276
return 'input path is not a directory'
274
277
275
278
# this line is moved here because some reason
@@ -375,5 +378,4 @@ def on_interrogate(
375
378
if unload_model_after_running :
376
379
interrogator .unload ()
377
380
378
- return "Succeed"
379
-
381
+ return 'Succeed'
0 commit comments