Spaces:
Running
on
Zero
Running
on
Zero
Upload 2 files
Browse files- app.py +2 -2
- modutils.py +2 -2
app.py
CHANGED
|
@@ -176,8 +176,8 @@ def download_things(directory, url, hf_token="", civitai_api_key=""):
|
|
| 176 |
if "?" in url:
|
| 177 |
url = url.split("?")[0]
|
| 178 |
if civitai_api_key:
|
| 179 |
-
|
| 180 |
-
os.system(f"aria2c --console-log-level=error --summary-interval=10
|
| 181 |
else:
|
| 182 |
print("\033[91mYou need an API key to download Civitai models.\033[0m")
|
| 183 |
else:
|
|
|
|
| 176 |
if "?" in url:
|
| 177 |
url = url.split("?")[0]
|
| 178 |
if civitai_api_key:
|
| 179 |
+
url = url + f"?token={civitai_api_key}"
|
| 180 |
+
os.system(f"aria2c --console-log-level=error --summary-interval=10 -c -x 16 -k 1M -s 16 -d {directory} {url}")
|
| 181 |
else:
|
| 182 |
print("\033[91mYou need an API key to download Civitai models.\033[0m")
|
| 183 |
else:
|
modutils.py
CHANGED
|
@@ -82,8 +82,8 @@ def download_things(directory, url, hf_token="", civitai_api_key=""):
|
|
| 82 |
if "?" in url:
|
| 83 |
url = url.split("?")[0]
|
| 84 |
if civitai_api_key:
|
| 85 |
-
|
| 86 |
-
os.system(f"aria2c --console-log-level=error --summary-interval=10
|
| 87 |
else:
|
| 88 |
print("\033[91mYou need an API key to download Civitai models.\033[0m")
|
| 89 |
else:
|
|
|
|
| 82 |
if "?" in url:
|
| 83 |
url = url.split("?")[0]
|
| 84 |
if civitai_api_key:
|
| 85 |
+
url = url + f"?token={civitai_api_key}"
|
| 86 |
+
os.system(f"aria2c --console-log-level=error --summary-interval=10 -c -x 16 -k 1M -s 16 -d {directory} {url}")
|
| 87 |
else:
|
| 88 |
print("\033[91mYou need an API key to download Civitai models.\033[0m")
|
| 89 |
else:
|