fix download for tag
Browse files
files_cells/notebooks/en/downloading_en.ipynb
CHANGED
@@ -451,7 +451,7 @@
|
|
451 |
" url += f\"{submodel['url']} {submodel['dst_dir']} {submodel['name']}, \"\n",
|
452 |
"\n",
|
453 |
"def process_file_download(file_url):\n",
|
454 |
-
" global Model_url, Vae_url, LoRA_url, Embedding_url, Extensions_url\n",
|
455 |
" urls_dict = {\n",
|
456 |
" 'model': 'Model_url',\n",
|
457 |
" 'vae': 'Vae_url',\n",
|
@@ -473,12 +473,13 @@
|
|
473 |
" current_tag = None\n",
|
474 |
" for line in lines:\n",
|
475 |
" if line.strip().startswith('#'):\n",
|
476 |
-
"
|
477 |
-
"
|
478 |
-
"
|
479 |
-
"
|
480 |
-
"
|
481 |
-
"
|
|
|
482 |
"\n",
|
483 |
"# fix all possible errors/options and function call\n",
|
484 |
"if custom_file_urls:\n",
|
|
|
451 |
" url += f\"{submodel['url']} {submodel['dst_dir']} {submodel['name']}, \"\n",
|
452 |
"\n",
|
453 |
"def process_file_download(file_url):\n",
|
454 |
+
" global Model_url, Vae_url, LoRA_url, Embedding_url, Extensions_url, ControlNet_url\n",
|
455 |
" urls_dict = {\n",
|
456 |
" 'model': 'Model_url',\n",
|
457 |
" 'vae': 'Vae_url',\n",
|
|
|
473 |
" current_tag = None\n",
|
474 |
" for line in lines:\n",
|
475 |
" if line.strip().startswith('#'):\n",
|
476 |
+
" if any(tag in line.lower() for tag in urls_dict):\n",
|
477 |
+
" current_tag = next((tag for tag in urls_dict if tag in line.lower()))\n",
|
478 |
+
"\n",
|
479 |
+
" urls = [url.strip() for url in line.split()]\n",
|
480 |
+
" for url in urls:\n",
|
481 |
+
" if url.startswith(\"http\"):\n",
|
482 |
+
" globals()[urls_dict[current_tag]] += \", \" + url\n",
|
483 |
"\n",
|
484 |
"# fix all possible errors/options and function call\n",
|
485 |
"if custom_file_urls:\n",
|
files_cells/notebooks/ru/downloading_ru.ipynb
CHANGED
@@ -473,12 +473,13 @@
|
|
473 |
" current_tag = None\n",
|
474 |
" for line in lines:\n",
|
475 |
" if line.strip().startswith('#'):\n",
|
476 |
-
"
|
477 |
-
"
|
478 |
-
"
|
479 |
-
"
|
480 |
-
"
|
481 |
-
"
|
|
|
482 |
"\n",
|
483 |
"# fix all possible errors/options and function call\n",
|
484 |
"if custom_file_urls:\n",
|
|
|
473 |
" current_tag = None\n",
|
474 |
" for line in lines:\n",
|
475 |
" if line.strip().startswith('#'):\n",
|
476 |
+
" if any(tag in line.lower() for tag in urls_dict):\n",
|
477 |
+
" current_tag = next((tag for tag in urls_dict if tag in line.lower()))\n",
|
478 |
+
"\n",
|
479 |
+
" urls = [url.strip() for url in line.split()]\n",
|
480 |
+
" for url in urls:\n",
|
481 |
+
" if url.startswith(\"http\"):\n",
|
482 |
+
" globals()[urls_dict[current_tag]] += \", \" + url\n",
|
483 |
"\n",
|
484 |
"# fix all possible errors/options and function call\n",
|
485 |
"if custom_file_urls:\n",
|
files_cells/python/en/downloading_en.py
CHANGED
@@ -432,7 +432,7 @@ for submodel in submodels:
|
|
432 |
url += f"{submodel['url']} {submodel['dst_dir']} {submodel['name']}, "
|
433 |
|
434 |
def process_file_download(file_url):
|
435 |
-
global Model_url, Vae_url, LoRA_url, Embedding_url, Extensions_url
|
436 |
urls_dict = {
|
437 |
'model': 'Model_url',
|
438 |
'vae': 'Vae_url',
|
@@ -454,12 +454,13 @@ def process_file_download(file_url):
|
|
454 |
current_tag = None
|
455 |
for line in lines:
|
456 |
if line.strip().startswith('#'):
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
|
|
463 |
|
464 |
# fix all possible errors/options and function call
|
465 |
if custom_file_urls:
|
|
|
432 |
url += f"{submodel['url']} {submodel['dst_dir']} {submodel['name']}, "
|
433 |
|
434 |
def process_file_download(file_url):
|
435 |
+
global Model_url, Vae_url, LoRA_url, Embedding_url, Extensions_url, ControlNet_url
|
436 |
urls_dict = {
|
437 |
'model': 'Model_url',
|
438 |
'vae': 'Vae_url',
|
|
|
454 |
current_tag = None
|
455 |
for line in lines:
|
456 |
if line.strip().startswith('#'):
|
457 |
+
if any(tag in line.lower() for tag in urls_dict):
|
458 |
+
current_tag = next((tag for tag in urls_dict if tag in line.lower()))
|
459 |
+
|
460 |
+
urls = [url.strip() for url in line.split()]
|
461 |
+
for url in urls:
|
462 |
+
if url.startswith("http"):
|
463 |
+
globals()[urls_dict[current_tag]] += ", " + url
|
464 |
|
465 |
# fix all possible errors/options and function call
|
466 |
if custom_file_urls:
|
files_cells/python/ru/downloading_ru.py
CHANGED
@@ -454,12 +454,13 @@ def process_file_download(file_url):
|
|
454 |
current_tag = None
|
455 |
for line in lines:
|
456 |
if line.strip().startswith('#'):
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
|
|
463 |
|
464 |
# fix all possible errors/options and function call
|
465 |
if custom_file_urls:
|
|
|
454 |
current_tag = None
|
455 |
for line in lines:
|
456 |
if line.strip().startswith('#'):
|
457 |
+
if any(tag in line.lower() for tag in urls_dict):
|
458 |
+
current_tag = next((tag for tag in urls_dict if tag in line.lower()))
|
459 |
+
|
460 |
+
urls = [url.strip() for url in line.split()]
|
461 |
+
for url in urls:
|
462 |
+
if url.startswith("http"):
|
463 |
+
globals()[urls_dict[current_tag]] += ", " + url
|
464 |
|
465 |
# fix all possible errors/options and function call
|
466 |
if custom_file_urls:
|