test kaggle ban
Browse files
files_cells/notebooks/en/downloading_en.ipynb
CHANGED
|
@@ -1,21 +1,12 @@
|
|
| 1 |
{
|
| 2 |
-
"nbformat": 4,
|
| 3 |
-
"nbformat_minor": 0,
|
| 4 |
-
"metadata": {
|
| 5 |
-
"colab": {
|
| 6 |
-
"provenance": []
|
| 7 |
-
},
|
| 8 |
-
"kernelspec": {
|
| 9 |
-
"name": "python3",
|
| 10 |
-
"display_name": "Python 3"
|
| 11 |
-
},
|
| 12 |
-
"language_info": {
|
| 13 |
-
"name": "python"
|
| 14 |
-
}
|
| 15 |
-
},
|
| 16 |
"cells": [
|
| 17 |
{
|
| 18 |
"cell_type": "code",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
"source": [
|
| 20 |
"##~ DOWNLOADING CODE | BY: ANXETY ~##\n",
|
| 21 |
"\n",
|
|
@@ -406,7 +397,7 @@
|
|
| 406 |
" if 'civitai' in url:\n",
|
| 407 |
" url = f\"{url}{'&' if '?' in url else '?'}token={civitai_token}\" # some authors are pussies and they need API token...\n",
|
| 408 |
" model_id = url.split('/')[-1]\n",
|
| 409 |
-
" clean_url = url.split('?')[
|
| 410 |
"\n",
|
| 411 |
" data = get_data_from_api(model_id, civitai_token)\n",
|
| 412 |
" if data:\n",
|
|
@@ -635,12 +626,21 @@
|
|
| 635 |
" for file in files_umi:\n",
|
| 636 |
" !aria2c --optimize-concurrent-downloads --console-log-level=error --summary-interval=10 -j5 -x16 -s16 -k1M -c -d {save_dir_path} {file}\n",
|
| 637 |
"del cap"
|
| 638 |
-
]
|
| 639 |
-
"metadata": {
|
| 640 |
-
"id": "2lJmbqrs3Mu8"
|
| 641 |
-
},
|
| 642 |
-
"execution_count": null,
|
| 643 |
-
"outputs": []
|
| 644 |
}
|
| 645 |
-
]
|
| 646 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
"cells": [
|
| 3 |
{
|
| 4 |
"cell_type": "code",
|
| 5 |
+
"execution_count": null,
|
| 6 |
+
"metadata": {
|
| 7 |
+
"id": "2lJmbqrs3Mu8"
|
| 8 |
+
},
|
| 9 |
+
"outputs": [],
|
| 10 |
"source": [
|
| 11 |
"##~ DOWNLOADING CODE | BY: ANXETY ~##\n",
|
| 12 |
"\n",
|
|
|
|
| 397 |
" if 'civitai' in url:\n",
|
| 398 |
" url = f\"{url}{'&' if '?' in url else '?'}token={civitai_token}\" # some authors are pussies and they need API token...\n",
|
| 399 |
" model_id = url.split('/')[-1]\n",
|
| 400 |
+
" clean_url = url.split('?')[0]\n",
|
| 401 |
"\n",
|
| 402 |
" data = get_data_from_api(model_id, civitai_token)\n",
|
| 403 |
" if data:\n",
|
|
|
|
| 626 |
" for file in files_umi:\n",
|
| 627 |
" !aria2c --optimize-concurrent-downloads --console-log-level=error --summary-interval=10 -j5 -x16 -s16 -k1M -c -d {save_dir_path} {file}\n",
|
| 628 |
"del cap"
|
| 629 |
+
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 630 |
}
|
| 631 |
+
],
|
| 632 |
+
"metadata": {
|
| 633 |
+
"colab": {
|
| 634 |
+
"provenance": []
|
| 635 |
+
},
|
| 636 |
+
"kernelspec": {
|
| 637 |
+
"display_name": "Python 3",
|
| 638 |
+
"name": "python3"
|
| 639 |
+
},
|
| 640 |
+
"language_info": {
|
| 641 |
+
"name": "python"
|
| 642 |
+
}
|
| 643 |
+
},
|
| 644 |
+
"nbformat": 4,
|
| 645 |
+
"nbformat_minor": 0
|
| 646 |
+
}
|
files_cells/notebooks/ru/downloading_ru.ipynb
CHANGED
|
@@ -1,21 +1,12 @@
|
|
| 1 |
{
|
| 2 |
-
"nbformat": 4,
|
| 3 |
-
"nbformat_minor": 0,
|
| 4 |
-
"metadata": {
|
| 5 |
-
"colab": {
|
| 6 |
-
"provenance": []
|
| 7 |
-
},
|
| 8 |
-
"kernelspec": {
|
| 9 |
-
"name": "python3",
|
| 10 |
-
"display_name": "Python 3"
|
| 11 |
-
},
|
| 12 |
-
"language_info": {
|
| 13 |
-
"name": "python"
|
| 14 |
-
}
|
| 15 |
-
},
|
| 16 |
"cells": [
|
| 17 |
{
|
| 18 |
"cell_type": "code",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
"source": [
|
| 20 |
"##~ DOWNLOADING CODE | BY: ANXETY ~##\n",
|
| 21 |
"\n",
|
|
@@ -406,7 +397,7 @@
|
|
| 406 |
" if 'civitai' in url:\n",
|
| 407 |
" url = f\"{url}{'&' if '?' in url else '?'}token={civitai_token}\" # some authors are pussies and they need API token...\n",
|
| 408 |
" model_id = url.split('/')[-1]\n",
|
| 409 |
-
" clean_url = url.split('?')[
|
| 410 |
"\n",
|
| 411 |
" data = get_data_from_api(model_id, civitai_token)\n",
|
| 412 |
" if data:\n",
|
|
@@ -635,12 +626,21 @@
|
|
| 635 |
" for file in files_umi:\n",
|
| 636 |
" !aria2c --optimize-concurrent-downloads --console-log-level=error --summary-interval=10 -j5 -x16 -s16 -k1M -c -d {save_dir_path} {file}\n",
|
| 637 |
"del cap"
|
| 638 |
-
]
|
| 639 |
-
"metadata": {
|
| 640 |
-
"id": "2lJmbqrs3Mu8"
|
| 641 |
-
},
|
| 642 |
-
"execution_count": null,
|
| 643 |
-
"outputs": []
|
| 644 |
}
|
| 645 |
-
]
|
| 646 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
"cells": [
|
| 3 |
{
|
| 4 |
"cell_type": "code",
|
| 5 |
+
"execution_count": null,
|
| 6 |
+
"metadata": {
|
| 7 |
+
"id": "2lJmbqrs3Mu8"
|
| 8 |
+
},
|
| 9 |
+
"outputs": [],
|
| 10 |
"source": [
|
| 11 |
"##~ DOWNLOADING CODE | BY: ANXETY ~##\n",
|
| 12 |
"\n",
|
|
|
|
| 397 |
" if 'civitai' in url:\n",
|
| 398 |
" url = f\"{url}{'&' if '?' in url else '?'}token={civitai_token}\" # some authors are pussies and they need API token...\n",
|
| 399 |
" model_id = url.split('/')[-1]\n",
|
| 400 |
+
" clean_url = url.split('?')[0]\n",
|
| 401 |
"\n",
|
| 402 |
" data = get_data_from_api(model_id, civitai_token)\n",
|
| 403 |
" if data:\n",
|
|
|
|
| 626 |
" for file in files_umi:\n",
|
| 627 |
" !aria2c --optimize-concurrent-downloads --console-log-level=error --summary-interval=10 -j5 -x16 -s16 -k1M -c -d {save_dir_path} {file}\n",
|
| 628 |
"del cap"
|
| 629 |
+
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 630 |
}
|
| 631 |
+
],
|
| 632 |
+
"metadata": {
|
| 633 |
+
"colab": {
|
| 634 |
+
"provenance": []
|
| 635 |
+
},
|
| 636 |
+
"kernelspec": {
|
| 637 |
+
"display_name": "Python 3",
|
| 638 |
+
"name": "python3"
|
| 639 |
+
},
|
| 640 |
+
"language_info": {
|
| 641 |
+
"name": "python"
|
| 642 |
+
}
|
| 643 |
+
},
|
| 644 |
+
"nbformat": 4,
|
| 645 |
+
"nbformat_minor": 0
|
| 646 |
+
}
|
files_cells/python/en/downloading_en.py
CHANGED
|
@@ -387,7 +387,7 @@ def manual_download(url, dst_dir, file_name):
|
|
| 387 |
if 'civitai' in url:
|
| 388 |
url = f"{url}{'&' if '?' in url else '?'}token={civitai_token}" # some authors are pussies and they need API token...
|
| 389 |
model_id = url.split('/')[-1]
|
| 390 |
-
clean_url = url.split('?')[
|
| 391 |
|
| 392 |
data = get_data_from_api(model_id, civitai_token)
|
| 393 |
if data:
|
|
@@ -395,9 +395,9 @@ def manual_download(url, dst_dir, file_name):
|
|
| 395 |
if model_name and image_url:
|
| 396 |
image_file_name = gen_preview_filename(model_name if not file_name else file_name, image_url)
|
| 397 |
if model_type in supported_types:
|
| 398 |
-
with capture.capture_output() as cap: # clear shit
|
| 399 |
-
|
| 400 |
-
del cap
|
| 401 |
file_name = file_name or model_name # assigns the original file name if not specified initially
|
| 402 |
|
| 403 |
""" information output """
|
|
|
|
| 387 |
if 'civitai' in url:
|
| 388 |
url = f"{url}{'&' if '?' in url else '?'}token={civitai_token}" # some authors are pussies and they need API token...
|
| 389 |
model_id = url.split('/')[-1]
|
| 390 |
+
clean_url = url.split('?')[0]
|
| 391 |
|
| 392 |
data = get_data_from_api(model_id, civitai_token)
|
| 393 |
if data:
|
|
|
|
| 395 |
if model_name and image_url:
|
| 396 |
image_file_name = gen_preview_filename(model_name if not file_name else file_name, image_url)
|
| 397 |
if model_type in supported_types:
|
| 398 |
+
# with capture.capture_output() as cap: # clear shit
|
| 399 |
+
# get_ipython().system('aria2c {aria2_args} -d {dst_dir} -o {image_file_name} {image_url}')
|
| 400 |
+
# del cap
|
| 401 |
file_name = file_name or model_name # assigns the original file name if not specified initially
|
| 402 |
|
| 403 |
""" information output """
|
files_cells/python/ru/downloading_ru.py
CHANGED
|
@@ -387,7 +387,7 @@ def manual_download(url, dst_dir, file_name):
|
|
| 387 |
if 'civitai' in url:
|
| 388 |
url = f"{url}{'&' if '?' in url else '?'}token={civitai_token}" # some authors are pussies and they need API token...
|
| 389 |
model_id = url.split('/')[-1]
|
| 390 |
-
clean_url = url.split('?')[
|
| 391 |
|
| 392 |
data = get_data_from_api(model_id, civitai_token)
|
| 393 |
if data:
|
|
@@ -395,9 +395,9 @@ def manual_download(url, dst_dir, file_name):
|
|
| 395 |
if model_name and image_url:
|
| 396 |
image_file_name = gen_preview_filename(model_name if not file_name else file_name, image_url)
|
| 397 |
if model_type in supported_types:
|
| 398 |
-
with capture.capture_output() as cap: # clear shit
|
| 399 |
-
|
| 400 |
-
del cap
|
| 401 |
file_name = file_name or model_name # assigns the original file name if not specified initially
|
| 402 |
|
| 403 |
""" information output """
|
|
|
|
| 387 |
if 'civitai' in url:
|
| 388 |
url = f"{url}{'&' if '?' in url else '?'}token={civitai_token}" # some authors are pussies and they need API token...
|
| 389 |
model_id = url.split('/')[-1]
|
| 390 |
+
clean_url = url.split('?')[0]
|
| 391 |
|
| 392 |
data = get_data_from_api(model_id, civitai_token)
|
| 393 |
if data:
|
|
|
|
| 395 |
if model_name and image_url:
|
| 396 |
image_file_name = gen_preview_filename(model_name if not file_name else file_name, image_url)
|
| 397 |
if model_type in supported_types:
|
| 398 |
+
# with capture.capture_output() as cap: # clear shit
|
| 399 |
+
# get_ipython().system('aria2c {aria2_args} -d {dst_dir} -o {image_file_name} {image_url}')
|
| 400 |
+
# del cap
|
| 401 |
file_name = file_name or model_name # assigns the original file name if not specified initially
|
| 402 |
|
| 403 |
""" information output """
|