John6666 commited on
Commit
b4477ed
1 Parent(s): bcef5d0

Upload 9 files

Browse files
Files changed (6) hide show
  1. constants.py +26 -8
  2. dc.py +26 -2
  3. llmdolphin.py +46 -0
  4. lora_dict.json +112 -0
  5. requirements.txt +2 -1
  6. utils.py +43 -2
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,
dc.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,
@@ -109,8 +111,8 @@ for url_embed in DOWNLOAD_EMBEDS:
109
 
110
  # Build list models
111
  embed_list = get_model_list(DIRECTORY_EMBEDS)
112
- model_list = get_model_list(DIRECTORY_MODELS)
113
- model_list = load_diffusers_format_model + model_list
114
 
115
  ## BEGIN MOD
116
  lora_model_list = get_lora_model_list()
@@ -135,6 +137,21 @@ class GuiSD:
135
  self.status_loading = False
136
  self.sleep_loading = 4
137
  self.last_load = datetime.now()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
 
139
  def infer_short(self, model, pipe_params, progress=gr.Progress(track_tqdm=True)):
140
  #progress(0, desc="Start inference...")
@@ -148,6 +165,11 @@ class GuiSD:
148
  return img
149
 
150
  def load_new_model(self, model_name, vae_model, task, progress=gr.Progress(track_tqdm=True)):
 
 
 
 
 
151
  vae_model = vae_model if vae_model != "None" else None
152
  model_type = get_model_type(model_name)
153
  dtype_model = torch.bfloat16 if model_type == "FLUX" else torch.float16
@@ -160,6 +182,8 @@ class GuiSD:
160
  token=True,
161
  )
162
 
 
 
163
  for i in range(68):
164
  if not self.status_loading:
165
  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,
 
111
 
112
  # Build list models
113
  embed_list = get_model_list(DIRECTORY_EMBEDS)
114
+ single_file_model_list = get_model_list(DIRECTORY_MODELS)
115
+ model_list = list_uniq(get_model_id_list() + LOAD_DIFFUSERS_FORMAT_MODEL + single_file_model_list)
116
 
117
  ## BEGIN MOD
118
  lora_model_list = get_lora_model_list()
 
137
  self.status_loading = False
138
  self.sleep_loading = 4
139
  self.last_load = datetime.now()
140
+ self.inventory = []
141
+
142
+ def update_storage_models(self, storage_floor_gb=42, required_inventory_for_purge=3):
143
+ while get_used_storage_gb() > storage_floor_gb:
144
+ if len(self.inventory) < required_inventory_for_purge:
145
+ break
146
+ removal_candidate = self.inventory.pop(0)
147
+ delete_model(removal_candidate)
148
+
149
+ def update_inventory(self, model_name):
150
+ if model_name not in single_file_model_list:
151
+ self.inventory = [
152
+ m for m in self.inventory if m != model_name
153
+ ] + [model_name]
154
+ print(self.inventory)
155
 
156
  def infer_short(self, model, pipe_params, progress=gr.Progress(track_tqdm=True)):
157
  #progress(0, desc="Start inference...")
 
165
  return img
166
 
167
  def load_new_model(self, model_name, vae_model, task, progress=gr.Progress(track_tqdm=True)):
168
+
169
+ self.update_storage_models()
170
+
171
+ # download link model > model_name
172
+
173
  vae_model = vae_model if vae_model != "None" else None
174
  model_type = get_model_type(model_name)
175
  dtype_model = torch.bfloat16 if model_type == "FLUX" else torch.float16
 
182
  token=True,
183
  )
184
 
185
+ self.update_inventory(model_name)
186
+
187
  for i in range(68):
188
  if not self.status_loading:
189
  self.status_loading = True
llmdolphin.py CHANGED
@@ -79,6 +79,52 @@ llm_models = {
79
  "ChatWaifu_22B_v2.0_preview.Q4_K_S.gguf": ["mradermacher/ChatWaifu_22B_v2.0_preview-GGUF", MessagesFormatterType.MISTRAL],
80
  "ChatWaifu_v1.4.Q5_K_M.gguf": ["mradermacher/ChatWaifu_v1.4-GGUF", MessagesFormatterType.MISTRAL],
81
  "ChatWaifu_v1.3.1.Q4_K_M.gguf": ["mradermacher/ChatWaifu_v1.3.1-GGUF", MessagesFormatterType.MISTRAL],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  "magnum-12b-v2.5-kto.i1-Q4_K_M.gguf": ["mradermacher/magnum-12b-v2.5-kto-i1-GGUF", MessagesFormatterType.CHATML],
83
  "L3.1-8B-Slush.i1-Q5_K_M.gguf": ["mradermacher/L3.1-8B-Slush-i1-GGUF", MessagesFormatterType.LLAMA_3],
84
  "QandoraExp-7B-Persona.i1-Q5_K_M.gguf": ["mradermacher/QandoraExp-7B-Persona-i1-GGUF", MessagesFormatterType.OPEN_CHAT],
 
79
  "ChatWaifu_22B_v2.0_preview.Q4_K_S.gguf": ["mradermacher/ChatWaifu_22B_v2.0_preview-GGUF", MessagesFormatterType.MISTRAL],
80
  "ChatWaifu_v1.4.Q5_K_M.gguf": ["mradermacher/ChatWaifu_v1.4-GGUF", MessagesFormatterType.MISTRAL],
81
  "ChatWaifu_v1.3.1.Q4_K_M.gguf": ["mradermacher/ChatWaifu_v1.3.1-GGUF", MessagesFormatterType.MISTRAL],
82
+ "SeQwence-14B-v5.Q4_K_S.gguf": ["mradermacher/SeQwence-14B-v5-GGUF", MessagesFormatterType.OPEN_CHAT],
83
+ "L3.1-8B-Dark-Planet-Slush.i1-Q4_K_M.gguf": ["mradermacher/L3.1-8B-Dark-Planet-Slush-i1-GGUF", MessagesFormatterType.LLAMA_3],
84
+ "QwenSlerp12-7B.Q5_K_M.gguf": ["mradermacher/QwenSlerp12-7B-GGUF", MessagesFormatterType.OPEN_CHAT],
85
+ "qwen-carpmuscle-v0.4.Q4_K_M.gguf": ["mradermacher/qwen-carpmuscle-v0.4-GGUF", MessagesFormatterType.OPEN_CHAT],
86
+ "L3.1-8B-Slush-v1.1.i1-Q4_K_M.gguf": ["mradermacher/L3.1-8B-Slush-v1.1-i1-GGUF", MessagesFormatterType.LLAMA_3],
87
+ "Llama-3.2-8B-Instruct.Q5_K_M.gguf": ["mradermacher/Llama-3.2-8B-Instruct-GGUF", MessagesFormatterType.LLAMA_3],
88
+ "Homer-v0.3-Qwen2.5-7B.Q5_K_M.gguf": ["mradermacher/Homer-v0.3-Qwen2.5-7B-GGUF", MessagesFormatterType.OPEN_CHAT],
89
+ "Norns-Qwen2.5-7B-v0.2.i1-Q5_K_M.gguf": ["mradermacher/Norns-Qwen2.5-7B-v0.2-i1-GGUF", MessagesFormatterType.OPEN_CHAT],
90
+ "LLAMA-3_8B_Unaligned_BETA.i1-Q5_K_M.gguf": ["mradermacher/LLAMA-3_8B_Unaligned_BETA-i1-GGUF", MessagesFormatterType.LLAMA_3],
91
+ "SELM-Llama-3-8B-Instruct-iter-3.Q5_K_M.gguf": ["mradermacher/SELM-Llama-3-8B-Instruct-iter-3-GGUF", MessagesFormatterType.LLAMA_3],
92
+ "ArliAI-RPMax-v1.3-merge-8B.i1-Q4_K_M.gguf": ["mradermacher/ArliAI-RPMax-v1.3-merge-8B-i1-GGUF", MessagesFormatterType.LLAMA_3],
93
+ "gemma-2-9b-it-DS-V2.Q4_K_M.gguf": ["mradermacher/gemma-2-9b-it-DS-V2-GGUF", MessagesFormatterType.ALPACA],
94
+ "Stheno-Hercules-3.1-8B.i1-Q5_K_M.gguf": ["mradermacher/Stheno-Hercules-3.1-8B-i1-GGUF", MessagesFormatterType.LLAMA_3],
95
+ "EVA-Norns-Qwen2.5-v0.1.i1-Q5_K_M.gguf": ["mradermacher/EVA-Norns-Qwen2.5-v0.1-i1-GGUF", MessagesFormatterType.OPEN_CHAT],
96
+ "Infinirc-ArliAI-RPMax-v1.3-merge-8B.i1-Q5_K_M.gguf": ["mradermacher/Infinirc-ArliAI-RPMax-v1.3-merge-8B-i1-GGUF", MessagesFormatterType.LLAMA_3],
97
+ "Verdandi-Qwen2.5-7B.Q5_K_M.gguf": ["mradermacher/Verdandi-Qwen2.5-7B-GGUF", MessagesFormatterType.OPEN_CHAT],
98
+ "Qwen2-Wukong-7B.Q5_K_M.gguf": ["mradermacher/Qwen2-Wukong-7B-GGUF", MessagesFormatterType.OPEN_CHAT],
99
+ "Lelantos-7B.Q5_K_M.gguf": ["mradermacher/Lelantos-7B-GGUF", MessagesFormatterType.MISTRAL],
100
+ "Kunoichi-7B.Q5_K_M.gguf": ["mradermacher/Kunoichi-7B-GGUF", MessagesFormatterType.MISTRAL],
101
+ "llama-3-cat-8b-instruct-v1.Q5_K_M.gguf": ["mradermacher/llama-3-cat-8b-instruct-v1-GGUF", MessagesFormatterType.LLAMA_3],
102
+ "DPOpenHermes-7B.i1-Q5_K_M.gguf": ["mradermacher/DPOpenHermes-7B-i1-GGUF", MessagesFormatterType.MISTRAL],
103
+ "NeuralDaredevil-8B-abliterated.Q5_K_M.gguf": ["mradermacher/NeuralDaredevil-8B-abliterated-GGUF", MessagesFormatterType.LLAMA_3],
104
+ "AstroSage-8B.Q5_K_M.gguf": ["mradermacher/AstroSage-8B-GGUF", MessagesFormatterType.LLAMA_3],
105
+ "Llama-3-8B-Theresa.Q5_K_M.gguf": ["mradermacher/Llama-3-8B-Theresa-GGUF", MessagesFormatterType.LLAMA_3],
106
+ "Sonya-7B.Q5_K_M.gguf": ["mradermacher/Sonya-7B-GGUF", MessagesFormatterType.MISTRAL],
107
+ "Hathor_Tahsin-L3-8B-v0.9.Q4_K_S.gguf": ["mradermacher/Hathor_Tahsin-L3-8B-v0.9-GGUF", MessagesFormatterType.LLAMA_3],
108
+ "Qwen-Qwen2.5-7B-Instruct-llamafied.Q5_K_M.gguf": ["mradermacher/Qwen-Qwen2.5-7B-Instruct-llamafied-GGUF", MessagesFormatterType.OPEN_CHAT],
109
+ "Ice0.34n-14.11-RP.i1-Q4_K_S.gguf": ["mradermacher/Ice0.34n-14.11-RP-i1-GGUF", MessagesFormatterType.MISTRAL],
110
+ "Qwen2.5-14B-Wernicke-SFT.Q4_K_S.gguf": ["mradermacher/Qwen2.5-14B-Wernicke-SFT-GGUF", MessagesFormatterType.OPEN_CHAT],
111
+ "Qwen2.5-7B-nerd-uncensored-v1.6.i1-Q4_K_S.gguf": ["mradermacher/Qwen2.5-7B-nerd-uncensored-v1.6-i1-GGUF", MessagesFormatterType.OPEN_CHAT],
112
+ "ArliAI-RPMax-v1.3-merge-8B.Q4_K_S.gguf": ["mradermacher/ArliAI-RPMax-v1.3-merge-8B-GGUF", MessagesFormatterType.LLAMA_3],
113
+ "MN-Violet-Lotus-12B.Q4_K_M.gguf": ["mradermacher/MN-Violet-Lotus-12B-GGUF", MessagesFormatterType.MISTRAL],
114
+ "Qwen2.5-7B-nerd-uncensored-v1.8.Q5_K_M.gguf": ["mradermacher/Qwen2.5-7B-nerd-uncensored-v1.8-GGUF", MessagesFormatterType.OPEN_CHAT],
115
+ "ArliAI-RPMax-v1.3-merge-llama3-8B.i1-Q4_K_M.gguf": ["mradermacher/ArliAI-RPMax-v1.3-merge-llama3-8B-i1-GGUF", MessagesFormatterType.LLAMA_3],
116
+ "Llama-3.1-SuperNova-8B-Lite_TIES_with_Base.i1-Q5_K_M.gguf": ["mradermacher/Llama-3.1-SuperNova-8B-Lite_TIES_with_Base-i1-GGUF", MessagesFormatterType.LLAMA_3],
117
+ "maverick-llama3-8B.i1-Q4_K_M.gguf": ["mradermacher/maverick-llama3-8B-i1-GGUF", MessagesFormatterType.LLAMA_3],
118
+ "JSL-MedLlama-3-8B-v2.0.i1-Q5_K_M.gguf": ["mradermacher/JSL-MedLlama-3-8B-v2.0-i1-GGUF", MessagesFormatterType.LLAMA_3],
119
+ "hiwaifu-12b.i1-Q4_K_M.gguf": ["mradermacher/hiwaifu-12b-i1-GGUF", MessagesFormatterType.MISTRAL],
120
+ "samantha-1.1-westlake-7b-laser.i1-Q5_K_M.gguf": ["mradermacher/samantha-1.1-westlake-7b-laser-i1-GGUF", MessagesFormatterType.MISTRAL],
121
+ "Wukong-0.1-Mistral-7B-v0.2.i1-Q5_K_M.gguf": ["mradermacher/Wukong-0.1-Mistral-7B-v0.2-i1-GGUF", MessagesFormatterType.MISTRAL],
122
+ "InfinityRP-v1-7B.i1-Q5_K_M.gguf": ["mradermacher/InfinityRP-v1-7B-i1-GGUF", MessagesFormatterType.MISTRAL],
123
+ "L3-Luna-8B.i1-Q5_K_M.gguf": ["mradermacher/L3-Luna-8B-i1-GGUF", MessagesFormatterType.LLAMA_3],
124
+ "Awanllm-Llama-3-8B-Instruct-ORPO-v0.1.i1-Q5_K_M.gguf": ["mradermacher/Awanllm-Llama-3-8B-Instruct-ORPO-v0.1-i1-GGUF", MessagesFormatterType.LLAMA_3],
125
+ "dolphin-2.9.1-llama-3-8b.i1-Q5_K_M.gguf": ["mradermacher/dolphin-2.9.1-llama-3-8b-i1-GGUF", MessagesFormatterType.LLAMA_3],
126
+ "EVA-Tissint-14B.i1-Q4_K_M.gguf": ["mradermacher/EVA-Tissint-14B-i1-GGUF", MessagesFormatterType.OPEN_CHAT],
127
+ "EVA-Tissint-v1.1-14B.Q4_K_M.gguf": ["mradermacher/EVA-Tissint-v1.1-14B-GGUF", MessagesFormatterType.OPEN_CHAT],
128
  "magnum-12b-v2.5-kto.i1-Q4_K_M.gguf": ["mradermacher/magnum-12b-v2.5-kto-i1-GGUF", MessagesFormatterType.CHATML],
129
  "L3.1-8B-Slush.i1-Q5_K_M.gguf": ["mradermacher/L3.1-8B-Slush-i1-GGUF", MessagesFormatterType.LLAMA_3],
130
  "QandoraExp-7B-Persona.i1-Q5_K_M.gguf": ["mradermacher/QandoraExp-7B-Persona-i1-GGUF", MessagesFormatterType.OPEN_CHAT],
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
@@ -4,8 +4,9 @@ diffusers
4
  invisible_watermark
5
  transformers
6
  xformers
7
- git+https://github.com/R3gm/stablepy.git@f686946 # -b refactor_sampler_fix
8
  torch==2.2.0
 
9
  gdown
10
  opencv-python
11
  huggingface_hub
 
4
  invisible_watermark
5
  transformers
6
  xformers
7
+ git+https://github.com/R3gm/stablepy.git@8edabb0 # -b refactor_sampler_fix
8
  torch==2.2.0
9
+ numpy<2
10
  gdown
11
  opencv-python
12
  huggingface_hub
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))