ura23 commited on
Commit
ec53dbf
·
verified ·
1 Parent(s): 796d8ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +179 -3
app.py CHANGED
@@ -16,7 +16,22 @@ Demo for the WaifuDiffusion tagger models
16
  HF_TOKEN = os.environ.get("HF_TOKEN", "")
17
 
18
  # Dataset v3 series of models:
 
 
19
  VIT_MODEL_DSV3_REPO = "ura23/wd-vit-tagger-v3"
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
  # Files to download from the repos
22
  MODEL_FILENAME = "model.onnx"
@@ -108,14 +123,175 @@ def main():
108
  predictor = Predictor()
109
 
110
  model_repos = [
 
 
111
  VIT_MODEL_DSV3_REPO,
 
 
 
 
 
 
 
 
 
 
 
112
  ]
113
 
114
- predefined_tags = ["2025",
 
115
  "2024",
116
- "2020",
117
  "2023",
118
- "2025"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
 
120
  with gr.Blocks(title=TITLE) as demo:
121
  gr.Markdown(f"<h1 style='text-align: center;'>{TITLE}</h1>")
 
16
  HF_TOKEN = os.environ.get("HF_TOKEN", "")
17
 
18
  # Dataset v3 series of models:
19
+ SWINV2_MODEL_DSV3_REPO = "SmilingWolf/wd-swinv2-tagger-v3"
20
+ CONV_MODEL_DSV3_REPO = "SmilingWolf/wd-convnext-tagger-v3"
21
  VIT_MODEL_DSV3_REPO = "ura23/wd-vit-tagger-v3"
22
+ VIT_LARGE_MODEL_DSV3_REPO = "SmilingWolf/wd-vit-large-tagger-v3"
23
+ EVA02_LARGE_MODEL_DSV3_REPO = "SmilingWolf/wd-eva02-large-tagger-v3"
24
+
25
+ # Dataset v2 series of models:
26
+ MOAT_MODEL_DSV2_REPO = "SmilingWolf/wd-v1-4-moat-tagger-v2"
27
+ SWIN_MODEL_DSV2_REPO = "SmilingWolf/wd-v1-4-swinv2-tagger-v2"
28
+ CONV_MODEL_DSV2_REPO = "SmilingWolf/wd-v1-4-convnext-tagger-v2"
29
+ CONV2_MODEL_DSV2_REPO = "SmilingWolf/wd-v1-4-convnextv2-tagger-v2"
30
+ VIT_MODEL_DSV2_REPO = "SmilingWolf/wd-v1-4-vit-tagger-v2"
31
+
32
+ # IdolSankaku series of models:
33
+ EVA02_LARGE_MODEL_IS_DSV1_REPO = "deepghs/idolsankaku-eva02-large-tagger-v1"
34
+ SWINV2_MODEL_IS_DSV1_REPO = "deepghs/idolsankaku-swinv2-tagger-v1"
35
 
36
  # Files to download from the repos
37
  MODEL_FILENAME = "model.onnx"
 
123
  predictor = Predictor()
124
 
125
  model_repos = [
126
+ SWINV2_MODEL_DSV3_REPO,
127
+ CONV_MODEL_DSV3_REPO,
128
  VIT_MODEL_DSV3_REPO,
129
+ VIT_LARGE_MODEL_DSV3_REPO,
130
+ EVA02_LARGE_MODEL_DSV3_REPO,
131
+ # ---
132
+ MOAT_MODEL_DSV2_REPO,
133
+ SWIN_MODEL_DSV2_REPO,
134
+ CONV_MODEL_DSV2_REPO,
135
+ CONV2_MODEL_DSV2_REPO,
136
+ VIT_MODEL_DSV2_REPO,
137
+ # ---
138
+ SWINV2_MODEL_IS_DSV1_REPO,
139
+ EVA02_LARGE_MODEL_IS_DSV1_REPO,
140
  ]
141
 
142
+ predefined_tags = ["loli",
143
+ "oppai_loli",
144
  "2024",
 
145
  "2023",
146
+ "2025",
147
+ "genderswap",
148
+ "genderswap_(otm)",
149
+ "genderswap_(otf)",
150
+ "genderswap_(mtf)",
151
+ "genderswap_(ftm)",
152
+ "respirator",
153
+ "head-mounted_display",
154
+ "2022",
155
+ "muscular_female",
156
+ "muscular",
157
+ "abs",
158
+ "2021",
159
+ "peeing",
160
+ "pee",
161
+ "round_eyewear",
162
+ "yellow-framed_eyewear",
163
+ "hetero",
164
+ "vaginal",
165
+ "straddling",
166
+ "girl_on_top",
167
+ "male_pubic_hair",
168
+ "cowgirl_position",
169
+ "happy_sex",
170
+ "vibrator_under_panties",
171
+ "vibrator_in_thighhighs",
172
+ "anal_beads",
173
+ "butt_plug",
174
+ "sex_toy",
175
+ "anal",
176
+ "object_insertion",
177
+ "dildo",
178
+ "anal_object_insertion",
179
+ "vaginal_object_insertion",
180
+ "semi-rimless_eyewear",
181
+ "red-framed_eyewear",
182
+ "under-rim_eyewear",
183
+ "3d_background",
184
+ "sample_watermark",
185
+ "onee-shota",
186
+ "incest",
187
+ "furry",
188
+ "can",
189
+ "drinking_can",
190
+ "holding_can",
191
+ "twitter_strip_game_(meme)",
192
+ "like_and_retweet",
193
+ "furry_female",
194
+ "realistic",
195
+ "egg_vibrator",
196
+ "tongue_piercing",
197
+ "handheld_game_console",
198
+ "game_controller",
199
+ "nintendo_switch",
200
+ "talking",
201
+ "swastika",
202
+ "character_name",
203
+ "vibrator",
204
+ "black-framed_eyewear",
205
+ "heterochromia",
206
+ "chibi",
207
+ "mini_person",
208
+ "controller",
209
+ "remote_control_vibrator",
210
+ "vibrator_under_clothes",
211
+ "thank_you",
212
+ "vibrator_cord",
213
+ "shota",
214
+ "cropped_legs",
215
+ "cropped_torso",
216
+ "traditional_media",
217
+ "color_guide",
218
+ "photorealistic",
219
+ "male_focus",
220
+ "black_babydoll",
221
+ "signature",
222
+ "web_address",
223
+ "censored_nipples",
224
+ "rhodes_island_logo_(arknights)",
225
+ "gothic_lolita",
226
+ "glasses",
227
+ "reference_inset",
228
+ "twitter_logo",
229
+ "mother_and_daughter",
230
+ "holding_controller",
231
+ "holding_game_controller",
232
+ "baby",
233
+ "heart_censor",
234
+ "pixiv_username",
235
+ "korean_text",
236
+ "pixiv_logo",
237
+ "greyscale_with_colored_background",
238
+ "water_bottle",
239
+ "body_writing",
240
+ "used_condom",
241
+ "multiple_condoms",
242
+ "condom_belt",
243
+ "holding_phone",
244
+ "multiple_views",
245
+ "phone",
246
+ "cellphone",
247
+ "zoom_layer",
248
+ "smartphone",
249
+ "lolita_hairband",
250
+ "lactation",
251
+ "otoko_no_ko",
252
+ "minigirl",
253
+ "babydoll",
254
+ "domino_mask",
255
+ "pixiv_id",
256
+ "qr_code",
257
+ "monochrome",
258
+ "trick_or_treat",
259
+ "happy_birthday",
260
+ "lolita_fashion",
261
+ "arrow_(symbol)",
262
+ "happy_new_year",
263
+ "dated",
264
+ "thought_bubble",
265
+ "greyscale",
266
+ "speech_bubble",
267
+ "mask",
268
+ "comic",
269
+ "bottle",
270
+ "holding_bottle",
271
+ "milk",
272
+ "milk_bottle",
273
+ "english_text",
274
+ "copyright_name",
275
+ "twitter_username",
276
+ "fanbox_username",
277
+ "patreon_username",
278
+ "patreon_logo",
279
+ "cover",
280
+ "weibo_logo",
281
+ "weibo_username",
282
+ "signature",
283
+ "content_rating",
284
+ "cover_page",
285
+ "doujin_cover",
286
+ "sex",
287
+ "artist_name",
288
+ "watermark",
289
+ "censored",
290
+ "bar_censor",
291
+ "blank_censor",
292
+ "blur_censor",
293
+ "light_censor",
294
+ "mosaic_censoring"]
295
 
296
  with gr.Blocks(title=TITLE) as demo:
297
  gr.Markdown(f"<h1 style='text-align: center;'>{TITLE}</h1>")