Update webUI.py
Browse files
webUI.py
CHANGED
|
@@ -250,5 +250,30 @@ uvr = UVRInterface()
|
|
| 250 |
uvr.cached_sources_clear()
|
| 251 |
|
| 252 |
webui = UVRWebUI(uvr, online_data_path='models/download_checks.json')
|
|
|
|
|
|
|
| 253 |
print(webui.models_url)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 254 |
webui.launch()
|
|
|
|
| 250 |
uvr.cached_sources_clear()
|
| 251 |
|
| 252 |
webui = UVRWebUI(uvr, online_data_path='models/download_checks.json')
|
| 253 |
+
|
| 254 |
+
|
| 255 |
print(webui.models_url)
|
| 256 |
+
model_dict = webui.models_url
|
| 257 |
+
|
| 258 |
+
import os
|
| 259 |
+
import wget
|
| 260 |
+
|
| 261 |
+
for category, models in model_dict.items():
|
| 262 |
+
if category == 'VR Arc' or category == 'MDX-Net':
|
| 263 |
+
|
| 264 |
+
for model_name, model_url in models.items():
|
| 265 |
+
if category == 'VR Arc':
|
| 266 |
+
model_path = 'models/VR_Models'
|
| 267 |
+
elif category == 'MDX-Net':
|
| 268 |
+
model_path = 'models/MDX_Net_Models'
|
| 269 |
+
|
| 270 |
+
os.system(f"aria2c --optimize-concurrent-downloads --console-log-level=error --summary-interval=10 -j5 -x16 -s16 -k1M -c -d {model_path} -Z {model_url}")
|
| 271 |
+
|
| 272 |
+
print("models downloaded successfully.")
|
| 273 |
+
else:
|
| 274 |
+
print(f"Ignoring category: {category}")
|
| 275 |
+
|
| 276 |
+
|
| 277 |
+
|
| 278 |
+
|
| 279 |
webui.launch()
|