John6666 commited on
Commit
5719917
·
verified ·
1 Parent(s): d6db322

Upload 7 files

Browse files
Files changed (5) hide show
  1. app.py +25 -1
  2. constants.py +26 -8
  3. lora_dict.json +112 -0
  4. requirements.txt +2 -1
  5. utils.py +43 -2
app.py CHANGED
@@ -36,6 +36,8 @@ from utils import (
36
  extract_exif_data,
37
  create_mask_now,
38
  download_diffuser_repo,
 
 
39
  progress_step_bar,
40
  html_template_message,
41
  escape_html,
@@ -102,7 +104,8 @@ vae_model_list.insert(0, "BakedVAE")
102
  vae_model_list.insert(0, "None")
103
 
104
  ## BEGIN MOD
105
- model_list = list_uniq(get_model_id_list() + LOAD_DIFFUSERS_FORMAT_MODEL + get_model_list(DIRECTORY_MODELS))
 
106
  download_private_repo(HF_SDXL_EMBEDS_NEGATIVE_PRIVATE_REPO, DIRECTORY_EMBEDS_SDXL, False)
107
  download_private_repo(HF_SDXL_EMBEDS_POSITIVE_PRIVATE_REPO, DIRECTORY_EMBEDS_POSITIVE_SDXL, False)
108
  embed_sdxl_list = get_model_list(DIRECTORY_EMBEDS_SDXL) + get_model_list(DIRECTORY_EMBEDS_POSITIVE_SDXL)
@@ -154,9 +157,28 @@ class GuiSD:
154
  self.status_loading = False
155
  self.sleep_loading = 4
156
  self.last_load = datetime.now()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
 
158
  def load_new_model(self, model_name, vae_model, task, progress=gr.Progress(track_tqdm=True)):
159
 
 
 
 
 
160
  vae_model = vae_model if vae_model != "None" else None
161
  model_type = get_model_type(model_name)
162
  dtype_model = torch.bfloat16 if model_type == "FLUX" else torch.float16
@@ -169,6 +191,8 @@ class GuiSD:
169
  token=True,
170
  )
171
 
 
 
172
  for i in range(68):
173
  if not self.status_loading:
174
  self.status_loading = True
 
36
  extract_exif_data,
37
  create_mask_now,
38
  download_diffuser_repo,
39
+ get_used_storage_gb,
40
+ delete_model,
41
  progress_step_bar,
42
  html_template_message,
43
  escape_html,
 
104
  vae_model_list.insert(0, "None")
105
 
106
  ## BEGIN MOD
107
+ single_file_model_list = get_model_list(DIRECTORY_MODELS)
108
+ model_list = list_uniq(get_model_id_list() + LOAD_DIFFUSERS_FORMAT_MODEL + single_file_model_list)
109
  download_private_repo(HF_SDXL_EMBEDS_NEGATIVE_PRIVATE_REPO, DIRECTORY_EMBEDS_SDXL, False)
110
  download_private_repo(HF_SDXL_EMBEDS_POSITIVE_PRIVATE_REPO, DIRECTORY_EMBEDS_POSITIVE_SDXL, False)
111
  embed_sdxl_list = get_model_list(DIRECTORY_EMBEDS_SDXL) + get_model_list(DIRECTORY_EMBEDS_POSITIVE_SDXL)
 
157
  self.status_loading = False
158
  self.sleep_loading = 4
159
  self.last_load = datetime.now()
160
+ self.inventory = []
161
+
162
+ def update_storage_models(self, storage_floor_gb=42, required_inventory_for_purge=3):
163
+ while get_used_storage_gb() > storage_floor_gb:
164
+ if len(self.inventory) < required_inventory_for_purge:
165
+ break
166
+ removal_candidate = self.inventory.pop(0)
167
+ delete_model(removal_candidate)
168
+
169
+ def update_inventory(self, model_name):
170
+ if model_name not in single_file_model_list:
171
+ self.inventory = [
172
+ m for m in self.inventory if m != model_name
173
+ ] + [model_name]
174
+ print(self.inventory)
175
 
176
  def load_new_model(self, model_name, vae_model, task, progress=gr.Progress(track_tqdm=True)):
177
 
178
+ self.update_storage_models()
179
+
180
+ # download link model > model_name
181
+
182
  vae_model = vae_model if vae_model != "None" else None
183
  model_type = get_model_type(model_name)
184
  dtype_model = torch.bfloat16 if model_type == "FLUX" else torch.float16
 
191
  token=True,
192
  )
193
 
194
+ self.update_inventory(model_name)
195
+
196
  for i in range(68):
197
  if not self.status_loading:
198
  self.status_loading = True
constants.py CHANGED
@@ -17,22 +17,34 @@ DOWNLOAD_LORA = "https://huggingface.co/Leopain/color/resolve/main/Coloring_book
17
 
18
  LOAD_DIFFUSERS_FORMAT_MODEL = [
19
  'stabilityai/stable-diffusion-xl-base-1.0',
 
20
  'black-forest-labs/FLUX.1-dev',
21
  'John6666/blue-pencil-flux1-v021-fp8-flux',
22
  'John6666/wai-ani-flux-v10forfp8-fp8-flux',
23
  'John6666/xe-anime-flux-v04-fp8-flux',
24
  'John6666/lyh-anime-flux-v2a1-fp8-flux',
25
  'John6666/carnival-unchained-v10-fp8-flux',
 
26
  'Freepik/flux.1-lite-8B-alpha',
27
  'shauray/FluxDev-HyperSD-merged',
28
  'mikeyandfriends/PixelWave_FLUX.1-dev_03',
29
  'terminusresearch/FluxBooru-v0.3',
 
 
30
  'John6666/noobai-xl-nai-xl-epsilonpred10version-sdxl',
 
31
  'John6666/noobai-xl-nai-xl-epsilonpred075version-sdxl',
 
32
  'John6666/noobai-xl-nai-xl-epsilonpred05version-sdxl',
33
  'John6666/noobai-cyberfix-v10-sdxl',
34
  'John6666/noobaiiter-xl-vpred-v075-sdxl',
 
 
 
 
35
  'John6666/complicated-noobai-merge-vprediction-sdxl',
 
 
36
  'John6666/noobai-fusion2-vpred-itercomp-v1-sdxl',
37
  'John6666/noobai-xl-nai-xl-vpredtestversion-sdxl',
38
  'John6666/chadmix-noobai075-illustrious01-v10-sdxl',
@@ -41,9 +53,15 @@ LOAD_DIFFUSERS_FORMAT_MODEL = [
41
  'John6666/illustrious-pencil-xl-v200-sdxl',
42
  'John6666/obsession-illustriousxl-v21-sdxl',
43
  'John6666/obsession-illustriousxl-v30-sdxl',
 
 
 
 
44
  'eienmojiki/Anything-XL',
45
  'eienmojiki/Starry-XL-v5.2',
46
  'John6666/meinaxl-v2-sdxl',
 
 
47
  'John6666/epicrealism-xl-v10kiss2-sdxl',
48
  'John6666/epicrealism-xl-v8kiss-sdxl',
49
  'misri/zavychromaxl_v80',
@@ -51,21 +69,22 @@ LOAD_DIFFUSERS_FORMAT_MODEL = [
51
  'SG161222/RealVisXL_V5.0',
52
  'misri/newrealityxlAllInOne_Newreality40',
53
  'gsdf/CounterfeitXL',
54
- 'John6666/silvermoon-mix-01xl-v11-sdxl',
55
  'WhiteAiZ/autismmixSDXL_autismmixConfetti_diffusers',
56
  'kitty7779/ponyDiffusionV6XL',
57
  'GraydientPlatformAPI/aniverse-pony',
58
  'John6666/ras-real-anime-screencap-v1-sdxl',
59
  'John6666/duchaiten-pony-xl-no-score-v60-sdxl',
60
  'John6666/mistoon-anime-ponyalpha-sdxl',
61
- 'John6666/3x3x3mixxl-v2-sdxl',
62
- 'John6666/3x3x3mixxl-3dv01-sdxl',
63
  'John6666/ebara-mfcg-pony-mix-v12-sdxl',
64
  'John6666/t-ponynai3-v51-sdxl',
65
  'John6666/t-ponynai3-v65-sdxl',
66
  'John6666/prefect-pony-xl-v3-sdxl',
 
67
  'John6666/mala-anime-mix-nsfw-pony-xl-v5-sdxl',
 
 
68
  'John6666/wai-real-mix-v11-sdxl',
 
69
  'John6666/wai-c-v6-sdxl',
70
  'John6666/iniverse-mix-xl-sfwnsfw-pony-guofeng-v43-sdxl',
71
  'John6666/sifw-annihilation-xl-v2-sdxl',
@@ -82,15 +101,11 @@ LOAD_DIFFUSERS_FORMAT_MODEL = [
82
  'John6666/duchaiten-pony-real-v11fix-sdxl',
83
  'John6666/duchaiten-pony-real-v20-sdxl',
84
  'John6666/duchaiten-pony-xl-no-score-v70-sdxl',
85
- 'Eugeoter/artiwaifu-diffusion-2.0',
86
- 'comin/IterComp',
87
  'KBlueLeaf/Kohaku-XL-Zeta',
88
  'cagliostrolab/animagine-xl-3.1',
89
  'yodayo-ai/kivotos-xl-2.0',
90
  'yodayo-ai/holodayo-xl-2.1',
91
  'yodayo-ai/clandestine-xl-1.0',
92
- 'ostris/OpenFLUX.1',
93
- 'shuttleai/shuttle-3-diffusion',
94
  'digiplay/majicMIX_sombre_v2',
95
  'digiplay/majicMIX_realistic_v6',
96
  'digiplay/majicMIX_realistic_v7',
@@ -137,6 +152,9 @@ DIRECTORY_LORAS = 'loras'
137
  DIRECTORY_VAES = 'vaes'
138
  DIRECTORY_EMBEDS = 'embedings'
139
 
 
 
 
140
  PREPROCESSOR_CONTROLNET = {
141
  "openpose": [
142
  "Openpose",
@@ -424,7 +442,7 @@ EXAMPLES_GUI = [
424
  0.35, # strength
425
  1.0, # cn scale
426
  0.05, # cn start
427
- 0.75, # cn end
428
  "Classic",
429
  None,
430
  35,
 
17
 
18
  LOAD_DIFFUSERS_FORMAT_MODEL = [
19
  'stabilityai/stable-diffusion-xl-base-1.0',
20
+ 'Laxhar/noobai-XL-1.0',
21
  'black-forest-labs/FLUX.1-dev',
22
  'John6666/blue-pencil-flux1-v021-fp8-flux',
23
  'John6666/wai-ani-flux-v10forfp8-fp8-flux',
24
  'John6666/xe-anime-flux-v04-fp8-flux',
25
  'John6666/lyh-anime-flux-v2a1-fp8-flux',
26
  'John6666/carnival-unchained-v10-fp8-flux',
27
+ 'John6666/iniverse-mix-xl-sfwnsfw-fluxdfp16nsfwv11-fp8-flux',
28
  'Freepik/flux.1-lite-8B-alpha',
29
  'shauray/FluxDev-HyperSD-merged',
30
  'mikeyandfriends/PixelWave_FLUX.1-dev_03',
31
  'terminusresearch/FluxBooru-v0.3',
32
+ 'ostris/OpenFLUX.1',
33
+ 'shuttleai/shuttle-3-diffusion',
34
  'John6666/noobai-xl-nai-xl-epsilonpred10version-sdxl',
35
+ 'Laxhar/noobai-XL-0.77',
36
  'John6666/noobai-xl-nai-xl-epsilonpred075version-sdxl',
37
+ 'Laxhar/noobai-XL-0.6',
38
  'John6666/noobai-xl-nai-xl-epsilonpred05version-sdxl',
39
  'John6666/noobai-cyberfix-v10-sdxl',
40
  'John6666/noobaiiter-xl-vpred-v075-sdxl',
41
+ 'John6666/ntr-mix-illustrious-xl-noob-xl-v40-sdxl',
42
+ 'John6666/ntr-mix-illustrious-xl-noob-xl-ntrmix35-sdxl',
43
+ 'John6666/haruki-mix-illustrious-v10-sdxl',
44
+ 'John6666/noobreal-v10-sdxl',
45
  'John6666/complicated-noobai-merge-vprediction-sdxl',
46
+ 'Laxhar/noobai-XL-Vpred-0.6',
47
+ 'John6666/noobai-xl-nai-xl-vpred05version-sdxl',
48
  'John6666/noobai-fusion2-vpred-itercomp-v1-sdxl',
49
  'John6666/noobai-xl-nai-xl-vpredtestversion-sdxl',
50
  'John6666/chadmix-noobai075-illustrious01-v10-sdxl',
 
53
  'John6666/illustrious-pencil-xl-v200-sdxl',
54
  'John6666/obsession-illustriousxl-v21-sdxl',
55
  'John6666/obsession-illustriousxl-v30-sdxl',
56
+ 'John6666/wai-nsfw-illustrious-v70-sdxl',
57
+ 'John6666/illustrious-pony-mix-v3-sdxl',
58
+ 'John6666/nova-anime-xl-illustriousv10-sdxl',
59
+ 'John6666/silvermoon-mix03-illustrious-v10-sdxl',
60
  'eienmojiki/Anything-XL',
61
  'eienmojiki/Starry-XL-v5.2',
62
  'John6666/meinaxl-v2-sdxl',
63
+ 'Eugeoter/artiwaifu-diffusion-2.0',
64
+ 'comin/IterComp',
65
  'John6666/epicrealism-xl-v10kiss2-sdxl',
66
  'John6666/epicrealism-xl-v8kiss-sdxl',
67
  'misri/zavychromaxl_v80',
 
69
  'SG161222/RealVisXL_V5.0',
70
  'misri/newrealityxlAllInOne_Newreality40',
71
  'gsdf/CounterfeitXL',
 
72
  'WhiteAiZ/autismmixSDXL_autismmixConfetti_diffusers',
73
  'kitty7779/ponyDiffusionV6XL',
74
  'GraydientPlatformAPI/aniverse-pony',
75
  'John6666/ras-real-anime-screencap-v1-sdxl',
76
  'John6666/duchaiten-pony-xl-no-score-v60-sdxl',
77
  'John6666/mistoon-anime-ponyalpha-sdxl',
 
 
78
  'John6666/ebara-mfcg-pony-mix-v12-sdxl',
79
  'John6666/t-ponynai3-v51-sdxl',
80
  'John6666/t-ponynai3-v65-sdxl',
81
  'John6666/prefect-pony-xl-v3-sdxl',
82
+ 'John6666/prefect-pony-xl-v4-sdxl',
83
  'John6666/mala-anime-mix-nsfw-pony-xl-v5-sdxl',
84
+ 'John6666/wai-ani-nsfw-ponyxl-v10-sdxl',
85
+ 'John6666/wai-ani-nsfw-ponyxl-v9-sdxl',
86
  'John6666/wai-real-mix-v11-sdxl',
87
+ 'John6666/babes-by-stable-yogi-ponyv3-sdxl',
88
  'John6666/wai-c-v6-sdxl',
89
  'John6666/iniverse-mix-xl-sfwnsfw-pony-guofeng-v43-sdxl',
90
  'John6666/sifw-annihilation-xl-v2-sdxl',
 
101
  'John6666/duchaiten-pony-real-v11fix-sdxl',
102
  'John6666/duchaiten-pony-real-v20-sdxl',
103
  'John6666/duchaiten-pony-xl-no-score-v70-sdxl',
 
 
104
  'KBlueLeaf/Kohaku-XL-Zeta',
105
  'cagliostrolab/animagine-xl-3.1',
106
  'yodayo-ai/kivotos-xl-2.0',
107
  'yodayo-ai/holodayo-xl-2.1',
108
  'yodayo-ai/clandestine-xl-1.0',
 
 
109
  'digiplay/majicMIX_sombre_v2',
110
  'digiplay/majicMIX_realistic_v6',
111
  'digiplay/majicMIX_realistic_v7',
 
152
  DIRECTORY_VAES = 'vaes'
153
  DIRECTORY_EMBEDS = 'embedings'
154
 
155
+ CACHE_HF = "/home/user/.cache/huggingface/hub/"
156
+ STORAGE_ROOT = "/home/user/"
157
+
158
  PREPROCESSOR_CONTROLNET = {
159
  "openpose": [
160
  "Openpose",
 
442
  0.35, # strength
443
  1.0, # cn scale
444
  0.05, # cn start
445
+ 0.8, # cn end
446
  "Classic",
447
  None,
448
  35,
lora_dict.json CHANGED
@@ -2519,6 +2519,13 @@
2519
  "https://civitai.com/models/504990",
2520
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/708e949d-7dfd-473b-952a-e09317b679ca/width=450/15176927.jpeg"
2521
  ],
 
 
 
 
 
 
 
2522
  "VibingDance_(frieren_vibing)_LoRA_PDXL_Anzhc": [
2523
  "vibingdance, animation sheet, chibi, dancing / simple background, white background",
2524
  "Pony",
@@ -2645,6 +2652,13 @@
2645
  "https://civitai.com/models/308865",
2646
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/0fd71659-09aa-4179-bfd2-879b623403d2/width=450/22504558.jpeg"
2647
  ],
 
 
 
 
 
 
 
2648
  "[hikari]missionary_holding_wrist_pony_v1": [
2649
  "missionary_holding_wrist",
2650
  "Pony",
@@ -2827,6 +2841,13 @@
2827
  "https://civitai.com/models/614638",
2828
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/0c6ed1ad-da10-4c9a-90ba-a1d12a8ea46c/width=450/22239895.jpeg"
2829
  ],
 
 
 
 
 
 
 
2830
  "_sdxl-transchool-pony": [
2831
  "transchool",
2832
  "Pony",
@@ -3674,6 +3695,13 @@
3674
  "https://civitai.com/models/812637",
3675
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/25e5c86b-a6d1-4129-99be-d37ebcd43e4b/width=450/32617666.jpeg"
3676
  ],
 
 
 
 
 
 
 
3677
  "china_dress_Pony_V1_0": [
3678
  "jyojifuku, china dress, skirt",
3679
  "Pony",
@@ -4171,6 +4199,13 @@
4171
  "https://civitai.com/models/603258",
4172
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/a9862d57-c319-439a-a392-8b16d4adfc42/width=450/21484810.jpeg"
4173
  ],
 
 
 
 
 
 
 
4174
  "donbiki_Pony_v1": [
4175
  "donbiki",
4176
  "Pony",
@@ -4227,6 +4262,13 @@
4227
  "https://civitai.com/models/393273",
4228
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/d61e0783-9d00-43a0-9b10-03f43ba40a51/width=450/9556301.jpeg"
4229
  ],
 
 
 
 
 
 
 
4230
  "dress_tug": [
4231
  "dress_tug",
4232
  "Pony",
@@ -4934,6 +4976,41 @@
4934
  "https://civitai.com/models/498731",
4935
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/06a0dc3a-42ba-42b5-9ea9-d6b6faa3543b/width=450/14812284.jpeg"
4936
  ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4937
  "hotarueye_xl_surprised_v20": [
4938
  "",
4939
  "Pony",
@@ -5095,6 +5172,13 @@
5095
  "https://civitai.com/models/549854",
5096
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/69569569-e7b2-454a-81d9-4a820d628bd6/width=450/17985023.jpeg"
5097
  ],
 
 
 
 
 
 
 
5098
  "japanese_girl_v1_1": [
5099
  "jpn-girl",
5100
  "SDXL 1.0",
@@ -5102,6 +5186,13 @@
5102
  "https://civitai.com/models/121579",
5103
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/4d702d98-996e-478c-9e1d-0115852a3457/width=450/1899358.jpeg"
5104
  ],
 
 
 
 
 
 
 
5105
  "jihanki_PONY_V1": [
5106
  "vending machine, outdoors, scenery, coca-cola, road, street, utility pole, power lines",
5107
  "Pony",
@@ -5354,6 +5445,13 @@
5354
  "https://civitai.com/models/655354",
5355
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/82734312-66f2-4d1f-a7f1-6c022fb4da78/width=450/24747865.jpeg"
5356
  ],
 
 
 
 
 
 
 
5357
  "kk_sexybody_02": [
5358
  "kk_sexybody_02, 1girl, solo, breasts, wet, nipples, cum on body, excessive pubic hair, nude",
5359
  "Pony",
@@ -5781,6 +5879,13 @@
5781
  "https://civitai.com/models/315944",
5782
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/7d391817-79ba-4afa-bd48-54ba3fce0847/width=450/6928651.jpeg"
5783
  ],
 
 
 
 
 
 
 
5784
  "mesugaki_Pony_v1": [
5785
  "mesugaki",
5786
  "Pony",
@@ -5991,6 +6096,13 @@
5991
  "https://civitai.com/models/467118",
5992
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/11eced9f-d779-4138-a940-ad81a0b0454c/width=450/17635537.jpeg"
5993
  ],
 
 
 
 
 
 
 
5994
  "nosepony1": [
5995
  "",
5996
  "Pony",
 
2519
  "https://civitai.com/models/504990",
2520
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/708e949d-7dfd-473b-952a-e09317b679ca/width=450/15176927.jpeg"
2521
  ],
2522
+ "Valkyria_Tentacles_Pony_V2": [
2523
+ "colorful tentacles, tentacle pit, Tentacle Restraints, tentacle floors, tentacle walls, Big tentacles, large tentacles, huge tentacles, giant tentacles, huge penis, giant penis, large insertion, Double insertion, triple insertion, inflation, lactation, stomach bulge, torn clothes, shiny, shiny skin, slime , wet skin, sweat, oral, fellatio, irrumatio, magical girl, wide spread legs, / bukkake, facial, excessive cum, cum drip, cum over, cum in pussy, vomiting cum, cum through, projectile,",
2524
+ "Pony",
2525
+ "Hentai Tentacles Hard Core (Valkyria Style) (PONY XL) | \u89e6\u624b\u51cc\u8fb1 (\u308f\u308b\u304d\u3085\u30fc\u308c \u30b9\u30bf\u30a4\u30eb)",
2526
+ "https://civitai.com/models/915381",
2527
+ "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/f6ce1d3d-02f9-48ec-922c-3099838cf836/width=450/38247950.jpeg"
2528
+ ],
2529
  "VibingDance_(frieren_vibing)_LoRA_PDXL_Anzhc": [
2530
  "vibingdance, animation sheet, chibi, dancing / simple background, white background",
2531
  "Pony",
 
2652
  "https://civitai.com/models/308865",
2653
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/0fd71659-09aa-4179-bfd2-879b623403d2/width=450/22504558.jpeg"
2654
  ],
2655
+ "[hikari]jellyfish_haircut_pony_v1": [
2656
+ "jfcut, long hair",
2657
+ "Pony",
2658
+ "\u6c34\u6bcd\u5934\u53d1\u578b / \u30af\u30e9\u30b2\u30ab\u30c3\u30c8 / Jellyfish haircut Concept Pony LoRA[HiKaRi]",
2659
+ "https://civitai.com/models/955239",
2660
+ "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/33e99e1e-5aa6-481a-989a-8e74b4d1c793/width=450/40538903.jpeg"
2661
+ ],
2662
  "[hikari]missionary_holding_wrist_pony_v1": [
2663
  "missionary_holding_wrist",
2664
  "Pony",
 
2841
  "https://civitai.com/models/614638",
2842
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/0c6ed1ad-da10-4c9a-90ba-a1d12a8ea46c/width=450/22239895.jpeg"
2843
  ],
2844
+ "_sdxl-style-illusioneyle": [
2845
+ "illusioneyle",
2846
+ "Illustrious",
2847
+ "for Illustrious, for \"Ilustrious\", stability of illustration patterns (Illustrious\u7528 \u7d75\u67c4\u5b89\u5b9a\u6027\u5411\u4e0a\u306e\u305f\u3081\u306b) LoRA",
2848
+ "https://civitai.com/models/944662",
2849
+ "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/ec2e9a82-7bb7-4363-954c-2d3cc7a0bd08/width=450/39901570.jpeg"
2850
+ ],
2851
  "_sdxl-transchool-pony": [
2852
  "transchool",
2853
  "Pony",
 
3695
  "https://civitai.com/models/812637",
3696
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/25e5c86b-a6d1-4129-99be-d37ebcd43e4b/width=450/32617666.jpeg"
3697
  ],
3698
+ "chikubi_karikari_v3_mt-enhanced": [
3699
+ "chikubi_karikari, from front, nipple stimulation, motion lines, sound effects, ${your desired breasts size} / chikubi_karikari, from side, nipple stimulation, motion lines, sound effects, ${your desired breasts size} / chikubi_karikari, from below, nipple stimulation, motion lines, sound effects, ${your desired breasts size}",
3700
+ "Pony",
3701
+ "(CONCEPT) Nipple-Scratching / \u4e73\u9996\u30ab\u30ea\u30ab\u30ea\u30aa\u30ca\u30cb\u30fc",
3702
+ "https://civitai.com/models/812637",
3703
+ "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/fb20c5fe-88e0-48b7-a656-b64691ecbb2f/width=450/40471676.jpeg"
3704
+ ],
3705
  "china_dress_Pony_V1_0": [
3706
  "jyojifuku, china dress, skirt",
3707
  "Pony",
 
4199
  "https://civitai.com/models/603258",
4200
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/a9862d57-c319-439a-a392-8b16d4adfc42/width=450/21484810.jpeg"
4201
  ],
4202
+ "donbiki_Illust_v1": [
4203
+ "donbiki",
4204
+ "Illustrious",
4205
+ "[Illust&XL&Pony] disgust / \u30c9\u30f3\u5f15\u304d / \u990a\u8c5a\u5834\u306e\u8c5a\u3092\u898b\u308b\u3088\u3046\u306a\u76ee",
4206
+ "https://civitai.com/models/759232",
4207
+ "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/8c40c192-c478-40b6-bcc4-a6628d3055a1/width=450/39890508.jpeg"
4208
+ ],
4209
  "donbiki_Pony_v1": [
4210
  "donbiki",
4211
  "Pony",
 
4262
  "https://civitai.com/models/393273",
4263
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/d61e0783-9d00-43a0-9b10-03f43ba40a51/width=450/9556301.jpeg"
4264
  ],
4265
+ "doyagao_xl_v10": [
4266
+ "",
4267
+ "Pony",
4268
+ "[SDXL] Doyagao (V-shaped eyebrows) helper / V\u5b57\u5f62\u7709(\u30c9\u30e4\u9854\u4ed6)",
4269
+ "https://civitai.com/models/953978",
4270
+ "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/6d353dec-111a-439d-a978-e05ee7442593/width=450/40460311.jpeg"
4271
+ ],
4272
  "dress_tug": [
4273
  "dress_tug",
4274
  "Pony",
 
4976
  "https://civitai.com/models/498731",
4977
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/06a0dc3a-42ba-42b5-9ea9-d6b6faa3543b/width=450/14812284.jpeg"
4978
  ],
4979
+ "hotarueye_xl_hosome1_v20": [
4980
+ "",
4981
+ "Pony",
4982
+ "[SDXL] Semi-closed eyes / \u7d30\u76ee",
4983
+ "https://civitai.com/models/941927",
4984
+ "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/7b19c76a-4472-4cb8-9554-9bf031be1ce4/width=450/39739501.jpeg"
4985
+ ],
4986
+ "hotarueye_xl_hosome2_v20": [
4987
+ "",
4988
+ "Pony",
4989
+ "[SDXL] Semi-closed eyes / \u7d30\u76ee",
4990
+ "https://civitai.com/models/941927",
4991
+ "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/fe620aa2-9e45-47ef-92a5-1c5c60da3be8/width=450/39739679.jpeg"
4992
+ ],
4993
+ "hotarueye_xl_normaljitome1_v10": [
4994
+ "",
4995
+ "Pony",
4996
+ "[SDXL] Jitome(scornful eyes) / \u30b8\u30c8\u76ee",
4997
+ "https://civitai.com/models/941966",
4998
+ "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/684286bd-4e91-499d-9261-fade57500bb5/width=450/39741453.jpeg"
4999
+ ],
5000
+ "hotarueye_xl_sleepy_v10": [
5001
+ "",
5002
+ "Pony",
5003
+ "[SDXL] Sleepy eyes / \u7720\u305d\u3046\u306a\u76ee",
5004
+ "https://civitai.com/models/926566",
5005
+ "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/5d7feca6-501b-41a6-9eca-54790f4909ef/width=450/38851516.jpeg"
5006
+ ],
5007
+ "hotarueye_xl_smirking_v10": [
5008
+ "",
5009
+ "Pony",
5010
+ "[SDXL] Smirking eyes / \u306b\u3084\u306b\u3084\u3057\u305f\u76ee",
5011
+ "https://civitai.com/models/926552",
5012
+ "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/7a1bde6a-82f5-4fed-b9f4-6364de49b6d7/width=450/38850481.jpeg"
5013
+ ],
5014
  "hotarueye_xl_surprised_v20": [
5015
  "",
5016
  "Pony",
 
5172
  "https://civitai.com/models/549854",
5173
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/69569569-e7b2-454a-81d9-4a820d628bd6/width=450/17985023.jpeg"
5174
  ],
5175
+ "inv_v_eyebrows_xl_v10": [
5176
+ "",
5177
+ "Pony",
5178
+ "[SDXL] Inverted V-shaped eyebrows / \u30cf\u306e\u5b57\u578b\u306e\u7709",
5179
+ "https://civitai.com/models/953992",
5180
+ "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/11e36bc0-ef0d-415f-8a42-eb7b9d6bf9be/width=450/40461165.jpeg"
5181
+ ],
5182
  "japanese_girl_v1_1": [
5183
  "jpn-girl",
5184
  "SDXL 1.0",
 
5186
  "https://civitai.com/models/121579",
5187
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/4d702d98-996e-478c-9e1d-0115852a3457/width=450/1899358.jpeg"
5188
  ],
5189
+ "jellyfish-outfit-01": [
5190
+ "jellyfish outfit",
5191
+ "Pony",
5192
+ "Jellyfish Outfit",
5193
+ "https://civitai.com/models/955236",
5194
+ "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/c2444e84-3321-44e0-b430-2c4da65f6302/width=450/40537387.jpeg"
5195
+ ],
5196
  "jihanki_PONY_V1": [
5197
  "vending machine, outdoors, scenery, coca-cola, road, street, utility pole, power lines",
5198
  "Pony",
 
5445
  "https://civitai.com/models/655354",
5446
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/82734312-66f2-4d1f-a7f1-6c022fb4da78/width=450/24747865.jpeg"
5447
  ],
5448
+ "kitsune-dance-ponyxl-lora-nochekaiser": [
5449
+ "<lora:kitsune-dance-ponyxl-lora-nochekaiser:1>, kitsune dance, cheerleader, layered skirt, paw pose, fox ears, white belt, fox tail, baseball stadium, blue shirt, blue skirt, crop top, sleeveless shirt, midriff",
5450
+ "Pony",
5451
+ "Kitsune Dance (\u304d\u3064\u306d\u30c0\u30f3\u30b9) - Clothing",
5452
+ "https://civitai.com/models/943759",
5453
+ "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/6badb7f0-08e8-44e9-a6c7-62590eb9c511/width=450/39866024.jpeg"
5454
+ ],
5455
  "kk_sexybody_02": [
5456
  "kk_sexybody_02, 1girl, solo, breasts, wet, nipples, cum on body, excessive pubic hair, nude",
5457
  "Pony",
 
5879
  "https://civitai.com/models/315944",
5880
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/7d391817-79ba-4afa-bd48-54ba3fce0847/width=450/6928651.jpeg"
5881
  ],
5882
+ "mesugaki_Illust_v1": [
5883
+ "mesugaki",
5884
+ "Illustrious",
5885
+ "[Illust&XL&Pony] mesugaki / \u30e1\u30b9\u30ac\u30ad",
5886
+ "https://civitai.com/models/455382",
5887
+ "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/8e6a35ca-ae5b-478f-b46d-9b11fc44d77b/width=450/39100267.jpeg"
5888
+ ],
5889
  "mesugaki_Pony_v1": [
5890
  "mesugaki",
5891
  "Pony",
 
6096
  "https://civitai.com/models/467118",
6097
  "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/11eced9f-d779-4138-a940-ad81a0b0454c/width=450/17635537.jpeg"
6098
  ],
6099
+ "noobaiXL_EasyNegative_LoRA-3_0_last": [
6100
+ "",
6101
+ "Illustrious",
6102
+ "noobaiXL_EasyNegative",
6103
+ "https://civitai.com/models/923983",
6104
+ "https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/b97ba109-85de-4cce-9bfe-1764c4eb1ef0/width=450/38759818.jpeg"
6105
+ ],
6106
  "nosepony1": [
6107
  "",
6108
  "Pony",
requirements.txt CHANGED
@@ -1,5 +1,6 @@
1
- git+https://github.com/R3gm/stablepy.git@f686946 # -b refactor_sampler_fix
2
  torch==2.2.0
 
3
  gdown
4
  opencv-python
5
  torchvision
 
1
+ git+https://github.com/R3gm/stablepy.git@8edabb0 # -b refactor_sampler_fix
2
  torch==2.2.0
3
+ numpy<2
4
  gdown
5
  opencv-python
6
  torchvision
utils.py CHANGED
@@ -7,7 +7,10 @@ from constants import (
7
  HF_TOKEN,
8
  MODEL_TYPE_CLASS,
9
  DIRECTORY_LORAS,
 
10
  DIFFUSECRAFT_CHECKPOINT_NAME,
 
 
11
  )
12
  from huggingface_hub import HfApi
13
  from huggingface_hub import snapshot_download
@@ -22,6 +25,8 @@ import copy
22
  import requests
23
  from requests.adapters import HTTPAdapter
24
  from urllib3.util import Retry
 
 
25
 
26
  USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0'
27
 
@@ -110,7 +115,11 @@ def download_things(directory, url, hf_token="", civitai_api_key="", romanize=Fa
110
  print("\033[91mYou need an API key to download Civitai models.\033[0m")
111
 
112
  model_profile = retrieve_model_info(url)
113
- if model_profile.download_url and model_profile.filename_url:
 
 
 
 
114
  url = model_profile.download_url
115
  filename = unidecode(model_profile.filename_url) if romanize else model_profile.filename_url
116
  else:
@@ -314,7 +323,8 @@ def restart_space(repo_id: str, factory_reboot: bool):
314
 
315
 
316
  def extract_exif_data(image):
317
- if image is None: return ""
 
318
 
319
  try:
320
  metadata_keys = ['parameters', 'metadata', 'prompt', 'Comment']
@@ -410,6 +420,37 @@ def download_diffuser_repo(repo_name: str, model_type: str, revision: str = "mai
410
  return cached_folder
411
 
412
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
413
  def progress_step_bar(step, total):
414
  # Calculate the percentage for the progress bar width
415
  percentage = min(100, ((step / total) * 100))
 
7
  HF_TOKEN,
8
  MODEL_TYPE_CLASS,
9
  DIRECTORY_LORAS,
10
+ DIRECTORY_MODELS,
11
  DIFFUSECRAFT_CHECKPOINT_NAME,
12
+ CACHE_HF,
13
+ STORAGE_ROOT,
14
  )
15
  from huggingface_hub import HfApi
16
  from huggingface_hub import snapshot_download
 
25
  import requests
26
  from requests.adapters import HTTPAdapter
27
  from urllib3.util import Retry
28
+ import shutil
29
+ import subprocess
30
 
31
  USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0'
32
 
 
115
  print("\033[91mYou need an API key to download Civitai models.\033[0m")
116
 
117
  model_profile = retrieve_model_info(url)
118
+ if (
119
+ model_profile is not None
120
+ and model_profile.download_url
121
+ and model_profile.filename_url
122
+ ):
123
  url = model_profile.download_url
124
  filename = unidecode(model_profile.filename_url) if romanize else model_profile.filename_url
125
  else:
 
323
 
324
 
325
  def extract_exif_data(image):
326
+ if image is None:
327
+ return ""
328
 
329
  try:
330
  metadata_keys = ['parameters', 'metadata', 'prompt', 'Comment']
 
420
  return cached_folder
421
 
422
 
423
+ def get_folder_size_gb(folder_path):
424
+ result = subprocess.run(["du", "-s", folder_path], capture_output=True, text=True)
425
+
426
+ total_size_kb = int(result.stdout.split()[0])
427
+ total_size_gb = total_size_kb / (1024 ** 2)
428
+
429
+ return total_size_gb
430
+
431
+
432
+ def get_used_storage_gb():
433
+ try:
434
+ used_gb = get_folder_size_gb(STORAGE_ROOT)
435
+ print(f"Used Storage: {used_gb:.2f} GB")
436
+ except Exception as e:
437
+ used_gb = 999
438
+ print(f"Error while retrieving the used storage: {e}.")
439
+
440
+ return used_gb
441
+
442
+
443
+ def delete_model(removal_candidate):
444
+ print(f"Removing: {removal_candidate}")
445
+
446
+ if os.path.exists(removal_candidate):
447
+ os.remove(removal_candidate)
448
+ else:
449
+ diffusers_model = f"{CACHE_HF}{DIRECTORY_MODELS}--{removal_candidate.replace('/', '--')}"
450
+ if os.path.isdir(diffusers_model):
451
+ shutil.rmtree(diffusers_model)
452
+
453
+
454
  def progress_step_bar(step, total):
455
  # Calculate the percentage for the progress bar width
456
  percentage = min(100, ((step / total) * 100))