- files_cells/notebooks/en/downloading_en.ipynb +3 -4
- files_cells/notebooks/en/widgets_en.ipynb +1 -1
- files_cells/notebooks/ru/downloading_ru.ipynb +3 -4
- files_cells/notebooks/ru/widgets_ru.ipynb +4 -4
- files_cells/python/en/downloading_en.py +3 -4
- files_cells/python/en/widgets_en.py +1 -1
- files_cells/python/ru/downloading_ru.py +3 -4
- files_cells/python/ru/widgets_ru.py +4 -4
files_cells/notebooks/en/downloading_en.ipynb
CHANGED
@@ -375,10 +375,9 @@
|
|
375 |
" image_url = images[0].get('url', None) # get preview: first image\n",
|
376 |
" return model_name, image_url\n",
|
377 |
"\n",
|
378 |
-
"def generate_preview_filename(model_name
|
379 |
" file_parts = model_name.split('.')\n",
|
380 |
-
"
|
381 |
-
" return f\"{file_parts[0]}.preview.{image_format}\" # assigning the original image format\n",
|
382 |
"\n",
|
383 |
"''' main download code '''\n",
|
384 |
"\n",
|
@@ -415,7 +414,7 @@
|
|
415 |
" if data:\n",
|
416 |
" model_name, image_url = extract_file_and_image_info(data)\n",
|
417 |
" if model_name and image_url:\n",
|
418 |
-
" image_file_name = generate_preview_filename(model_name if not file_name else file_name
|
419 |
" with capture.capture_output() as cap: # clear shit\n",
|
420 |
" !aria2c {aria2_args} -d {dst_dir} -o {image_file_name} {image_url}\n",
|
421 |
" del cap\n",
|
|
|
375 |
" image_url = images[0].get('url', None) # get preview: first image\n",
|
376 |
" return model_name, image_url\n",
|
377 |
"\n",
|
378 |
+
"def generate_preview_filename(model_name):\n",
|
379 |
" file_parts = model_name.split('.')\n",
|
380 |
+
" return f\"{file_parts[0]}.preview.jpeg\" # assigning the original image format\n",
|
|
|
381 |
"\n",
|
382 |
"''' main download code '''\n",
|
383 |
"\n",
|
|
|
414 |
" if data:\n",
|
415 |
" model_name, image_url = extract_file_and_image_info(data)\n",
|
416 |
" if model_name and image_url:\n",
|
417 |
+
" image_file_name = generate_preview_filename(model_name if not file_name else file_name)\n",
|
418 |
" with capture.capture_output() as cap: # clear shit\n",
|
419 |
" !aria2c {aria2_args} -d {dst_dir} -o {image_file_name} {image_url}\n",
|
420 |
" del cap\n",
|
files_cells/notebooks/en/widgets_en.ipynb
CHANGED
@@ -485,7 +485,7 @@
|
|
485 |
"display(all_model_box)\n",
|
486 |
"\n",
|
487 |
"# --- VAE ---\n",
|
488 |
-
"vae_header = widgets.HTML('<div class=\"header\"
|
489 |
"vae_options = ['none',\n",
|
490 |
" '1.Anime.vae',\n",
|
491 |
" '2.Anything.vae',\n",
|
|
|
485 |
"display(all_model_box)\n",
|
486 |
"\n",
|
487 |
"# --- VAE ---\n",
|
488 |
+
"vae_header = widgets.HTML('<div class=\"header\">VAE Selection</div>')\n",
|
489 |
"vae_options = ['none',\n",
|
490 |
" '1.Anime.vae',\n",
|
491 |
" '2.Anything.vae',\n",
|
files_cells/notebooks/ru/downloading_ru.ipynb
CHANGED
@@ -375,10 +375,9 @@
|
|
375 |
" image_url = images[0].get('url', None) # get preview: first image\n",
|
376 |
" return model_name, image_url\n",
|
377 |
"\n",
|
378 |
-
"def generate_preview_filename(model_name
|
379 |
" file_parts = model_name.split('.')\n",
|
380 |
-
"
|
381 |
-
" return f\"{file_parts[0]}.preview.{image_format}\" # assigning the original image format\n",
|
382 |
"\n",
|
383 |
"''' main download code '''\n",
|
384 |
"\n",
|
@@ -415,7 +414,7 @@
|
|
415 |
" if data:\n",
|
416 |
" model_name, image_url = extract_file_and_image_info(data)\n",
|
417 |
" if model_name and image_url:\n",
|
418 |
-
" image_file_name = generate_preview_filename(model_name if not file_name else file_name
|
419 |
" with capture.capture_output() as cap: # clear shit\n",
|
420 |
" !aria2c {aria2_args} -d {dst_dir} -o {image_file_name} {image_url}\n",
|
421 |
" del cap\n",
|
|
|
375 |
" image_url = images[0].get('url', None) # get preview: first image\n",
|
376 |
" return model_name, image_url\n",
|
377 |
"\n",
|
378 |
+
"def generate_preview_filename(model_name):\n",
|
379 |
" file_parts = model_name.split('.')\n",
|
380 |
+
" return f\"{file_parts[0]}.preview.jpeg\" # assigning the original image format\n",
|
|
|
381 |
"\n",
|
382 |
"''' main download code '''\n",
|
383 |
"\n",
|
|
|
414 |
" if data:\n",
|
415 |
" model_name, image_url = extract_file_and_image_info(data)\n",
|
416 |
" if model_name and image_url:\n",
|
417 |
+
" image_file_name = generate_preview_filename(model_name if not file_name else file_name)\n",
|
418 |
" with capture.capture_output() as cap: # clear shit\n",
|
419 |
" !aria2c {aria2_args} -d {dst_dir} -o {image_file_name} {image_url}\n",
|
420 |
" del cap\n",
|
files_cells/notebooks/ru/widgets_ru.ipynb
CHANGED
@@ -56,7 +56,7 @@
|
|
56 |
"parser.add_argument('-y', type=int, help='Y coordinate for the image in px', metavar='', default=0)\n",
|
57 |
"parser.add_argument('-x', type=int, help='X coordinate for the image in px', metavar='', default=0)\n",
|
58 |
"parser.add_argument('-s', '--scale', type=int, help='Scale image in %%', metavar='', default=100)\n",
|
59 |
-
"parser.add_argument('-m', '--mode',action='store_true', help='Removes repetitive image tiles')\n",
|
60 |
"parser.add_argument('-t', '--transparent', action='store_true', help='Makes input/selection fields 35%% more transparent')\n",
|
61 |
"parser.add_argument('-bf', '--blur-fields', type=str, help='Background blur level for input/selection fields', metavar='', default=2)\n",
|
62 |
"args = parser.parse_args()\n",
|
@@ -485,7 +485,7 @@
|
|
485 |
"display(all_model_box)\n",
|
486 |
"\n",
|
487 |
"# --- VAE ---\n",
|
488 |
-
"vae_header = widgets.HTML('<div class=\"header\"
|
489 |
"vae_options = ['none',\n",
|
490 |
" '1.Anime.vae',\n",
|
491 |
" '2.Anything.vae',\n",
|
@@ -538,7 +538,7 @@
|
|
538 |
"# --- CUSTOM DOWNLOAD ---\n",
|
539 |
"custom_download_header_popup = widgets.HTML('''\n",
|
540 |
"<style>\n",
|
541 |
-
"/*
|
542 |
".sample_label {color: #dbafff;}\n",
|
543 |
".braces {color: #ffff00;}\n",
|
544 |
".extension {color: #eb934b;}\n",
|
@@ -546,7 +546,7 @@
|
|
546 |
"</style>\n",
|
547 |
"\n",
|
548 |
"<div class=\"header\" style=\"cursor: pointer;\" onclick=\"toggleContainer()\">Кастомная Загрузка</div>\n",
|
549 |
-
"<!-- PopUp
|
550 |
"<div class=\"info\" id=\"info_dl\">INFO</div>\n",
|
551 |
"<div class=\"popup\">\n",
|
552 |
" Разделите несколько URL-адресов запятой/пробелом. Для <span class=\"file_name\">пользовательского имени</span> файла/расширения укажите его через <span class=\"braces\">[]</span>\n",
|
|
|
56 |
"parser.add_argument('-y', type=int, help='Y coordinate for the image in px', metavar='', default=0)\n",
|
57 |
"parser.add_argument('-x', type=int, help='X coordinate for the image in px', metavar='', default=0)\n",
|
58 |
"parser.add_argument('-s', '--scale', type=int, help='Scale image in %%', metavar='', default=100)\n",
|
59 |
+
"parser.add_argument('-m', '--mode', action='store_true', help='Removes repetitive image tiles')\n",
|
60 |
"parser.add_argument('-t', '--transparent', action='store_true', help='Makes input/selection fields 35%% more transparent')\n",
|
61 |
"parser.add_argument('-bf', '--blur-fields', type=str, help='Background blur level for input/selection fields', metavar='', default=2)\n",
|
62 |
"args = parser.parse_args()\n",
|
|
|
485 |
"display(all_model_box)\n",
|
486 |
"\n",
|
487 |
"# --- VAE ---\n",
|
488 |
+
"vae_header = widgets.HTML('<div class=\"header\">Выбор VAE</div>')\n",
|
489 |
"vae_options = ['none',\n",
|
490 |
" '1.Anime.vae',\n",
|
491 |
" '2.Anything.vae',\n",
|
|
|
538 |
"# --- CUSTOM DOWNLOAD ---\n",
|
539 |
"custom_download_header_popup = widgets.HTML('''\n",
|
540 |
"<style>\n",
|
541 |
+
"/* Term Colors */\n",
|
542 |
".sample_label {color: #dbafff;}\n",
|
543 |
".braces {color: #ffff00;}\n",
|
544 |
".extension {color: #eb934b;}\n",
|
|
|
546 |
"</style>\n",
|
547 |
"\n",
|
548 |
"<div class=\"header\" style=\"cursor: pointer;\" onclick=\"toggleContainer()\">Кастомная Загрузка</div>\n",
|
549 |
+
"<!-- PopUp Window -->\n",
|
550 |
"<div class=\"info\" id=\"info_dl\">INFO</div>\n",
|
551 |
"<div class=\"popup\">\n",
|
552 |
" Разделите несколько URL-адресов запятой/пробелом. Для <span class=\"file_name\">пользовательского имени</span> файла/расширения укажите его через <span class=\"braces\">[]</span>\n",
|
files_cells/python/en/downloading_en.py
CHANGED
@@ -356,10 +356,9 @@ def extract_file_and_image_info(data):
|
|
356 |
image_url = images[0].get('url', None) # get preview: first image
|
357 |
return model_name, image_url
|
358 |
|
359 |
-
def generate_preview_filename(model_name
|
360 |
file_parts = model_name.split('.')
|
361 |
-
|
362 |
-
return f"{file_parts[0]}.preview.{image_format}" # assigning the original image format
|
363 |
|
364 |
''' main download code '''
|
365 |
|
@@ -396,7 +395,7 @@ def manual_download(url, dst_dir, file_name):
|
|
396 |
if data:
|
397 |
model_name, image_url = extract_file_and_image_info(data)
|
398 |
if model_name and image_url:
|
399 |
-
image_file_name = generate_preview_filename(model_name if not file_name else file_name
|
400 |
with capture.capture_output() as cap: # clear shit
|
401 |
get_ipython().system('aria2c {aria2_args} -d {dst_dir} -o {image_file_name} {image_url}')
|
402 |
del cap
|
|
|
356 |
image_url = images[0].get('url', None) # get preview: first image
|
357 |
return model_name, image_url
|
358 |
|
359 |
+
def generate_preview_filename(model_name):
|
360 |
file_parts = model_name.split('.')
|
361 |
+
return f"{file_parts[0]}.preview.jpeg" # assigning the original image format
|
|
|
362 |
|
363 |
''' main download code '''
|
364 |
|
|
|
395 |
if data:
|
396 |
model_name, image_url = extract_file_and_image_info(data)
|
397 |
if model_name and image_url:
|
398 |
+
image_file_name = generate_preview_filename(model_name if not file_name else file_name)
|
399 |
with capture.capture_output() as cap: # clear shit
|
400 |
get_ipython().system('aria2c {aria2_args} -d {dst_dir} -o {image_file_name} {image_url}')
|
401 |
del cap
|
files_cells/python/en/widgets_en.py
CHANGED
@@ -466,7 +466,7 @@ all_model_box = widgets.VBox([model_header, Model_widget, Model_Num_widget, Inpa
|
|
466 |
display(all_model_box)
|
467 |
|
468 |
# --- VAE ---
|
469 |
-
vae_header = widgets.HTML('<div class="header"
|
470 |
vae_options = ['none',
|
471 |
'1.Anime.vae',
|
472 |
'2.Anything.vae',
|
|
|
466 |
display(all_model_box)
|
467 |
|
468 |
# --- VAE ---
|
469 |
+
vae_header = widgets.HTML('<div class="header">VAE Selection</div>')
|
470 |
vae_options = ['none',
|
471 |
'1.Anime.vae',
|
472 |
'2.Anything.vae',
|
files_cells/python/ru/downloading_ru.py
CHANGED
@@ -356,10 +356,9 @@ def extract_file_and_image_info(data):
|
|
356 |
image_url = images[0].get('url', None) # get preview: first image
|
357 |
return model_name, image_url
|
358 |
|
359 |
-
def generate_preview_filename(model_name
|
360 |
file_parts = model_name.split('.')
|
361 |
-
|
362 |
-
return f"{file_parts[0]}.preview.{image_format}" # assigning the original image format
|
363 |
|
364 |
''' main download code '''
|
365 |
|
@@ -396,7 +395,7 @@ def manual_download(url, dst_dir, file_name):
|
|
396 |
if data:
|
397 |
model_name, image_url = extract_file_and_image_info(data)
|
398 |
if model_name and image_url:
|
399 |
-
image_file_name = generate_preview_filename(model_name if not file_name else file_name
|
400 |
with capture.capture_output() as cap: # clear shit
|
401 |
get_ipython().system('aria2c {aria2_args} -d {dst_dir} -o {image_file_name} {image_url}')
|
402 |
del cap
|
|
|
356 |
image_url = images[0].get('url', None) # get preview: first image
|
357 |
return model_name, image_url
|
358 |
|
359 |
+
def generate_preview_filename(model_name):
|
360 |
file_parts = model_name.split('.')
|
361 |
+
return f"{file_parts[0]}.preview.jpeg" # assigning the original image format
|
|
|
362 |
|
363 |
''' main download code '''
|
364 |
|
|
|
395 |
if data:
|
396 |
model_name, image_url = extract_file_and_image_info(data)
|
397 |
if model_name and image_url:
|
398 |
+
image_file_name = generate_preview_filename(model_name if not file_name else file_name)
|
399 |
with capture.capture_output() as cap: # clear shit
|
400 |
get_ipython().system('aria2c {aria2_args} -d {dst_dir} -o {image_file_name} {image_url}')
|
401 |
del cap
|
files_cells/python/ru/widgets_ru.py
CHANGED
@@ -37,7 +37,7 @@ parser.add_argument('-b', '--blur', type=str, help='Blur level for the image', m
|
|
37 |
parser.add_argument('-y', type=int, help='Y coordinate for the image in px', metavar='', default=0)
|
38 |
parser.add_argument('-x', type=int, help='X coordinate for the image in px', metavar='', default=0)
|
39 |
parser.add_argument('-s', '--scale', type=int, help='Scale image in %%', metavar='', default=100)
|
40 |
-
parser.add_argument('-m', '--mode',action='store_true', help='Removes repetitive image tiles')
|
41 |
parser.add_argument('-t', '--transparent', action='store_true', help='Makes input/selection fields 35%% more transparent')
|
42 |
parser.add_argument('-bf', '--blur-fields', type=str, help='Background blur level for input/selection fields', metavar='', default=2)
|
43 |
args = parser.parse_args()
|
@@ -466,7 +466,7 @@ all_model_box = widgets.VBox([model_header, Model_widget, Model_Num_widget, Inpa
|
|
466 |
display(all_model_box)
|
467 |
|
468 |
# --- VAE ---
|
469 |
-
vae_header = widgets.HTML('<div class="header"
|
470 |
vae_options = ['none',
|
471 |
'1.Anime.vae',
|
472 |
'2.Anything.vae',
|
@@ -519,7 +519,7 @@ display(all_additional_box)
|
|
519 |
# --- CUSTOM DOWNLOAD ---
|
520 |
custom_download_header_popup = widgets.HTML('''
|
521 |
<style>
|
522 |
-
/*
|
523 |
.sample_label {color: #dbafff;}
|
524 |
.braces {color: #ffff00;}
|
525 |
.extension {color: #eb934b;}
|
@@ -527,7 +527,7 @@ custom_download_header_popup = widgets.HTML('''
|
|
527 |
</style>
|
528 |
|
529 |
<div class="header" style="cursor: pointer;" onclick="toggleContainer()">Кастомная Загрузка</div>
|
530 |
-
<!-- PopUp
|
531 |
<div class="info" id="info_dl">INFO</div>
|
532 |
<div class="popup">
|
533 |
Разделите несколько URL-адресов запятой/пробелом. Для <span class="file_name">пользовательского имени</span> файла/расширения укажите его через <span class="braces">[]</span>
|
|
|
37 |
parser.add_argument('-y', type=int, help='Y coordinate for the image in px', metavar='', default=0)
|
38 |
parser.add_argument('-x', type=int, help='X coordinate for the image in px', metavar='', default=0)
|
39 |
parser.add_argument('-s', '--scale', type=int, help='Scale image in %%', metavar='', default=100)
|
40 |
+
parser.add_argument('-m', '--mode', action='store_true', help='Removes repetitive image tiles')
|
41 |
parser.add_argument('-t', '--transparent', action='store_true', help='Makes input/selection fields 35%% more transparent')
|
42 |
parser.add_argument('-bf', '--blur-fields', type=str, help='Background blur level for input/selection fields', metavar='', default=2)
|
43 |
args = parser.parse_args()
|
|
|
466 |
display(all_model_box)
|
467 |
|
468 |
# --- VAE ---
|
469 |
+
vae_header = widgets.HTML('<div class="header">Выбор VAE</div>')
|
470 |
vae_options = ['none',
|
471 |
'1.Anime.vae',
|
472 |
'2.Anything.vae',
|
|
|
519 |
# --- CUSTOM DOWNLOAD ---
|
520 |
custom_download_header_popup = widgets.HTML('''
|
521 |
<style>
|
522 |
+
/* Term Colors */
|
523 |
.sample_label {color: #dbafff;}
|
524 |
.braces {color: #ffff00;}
|
525 |
.extension {color: #eb934b;}
|
|
|
527 |
</style>
|
528 |
|
529 |
<div class="header" style="cursor: pointer;" onclick="toggleContainer()">Кастомная Загрузка</div>
|
530 |
+
<!-- PopUp Window -->
|
531 |
<div class="info" id="info_dl">INFO</div>
|
532 |
<div class="popup">
|
533 |
Разделите несколько URL-адресов запятой/пробелом. Для <span class="file_name">пользовательского имени</span> файла/расширения укажите его через <span class="braces">[]</span>
|