fix controlnet?
Browse files
files_cells/notebooks/en/downloading_en.ipynb
CHANGED
@@ -345,8 +345,9 @@
|
|
345 |
"!mkdir -p {models_dir} {vaes_dir} {embeddings_dir} {loras_dir} {control_dir}\n",
|
346 |
"\n",
|
347 |
"url = \"\"\n",
|
348 |
-
"hf_token = optional_huggingface_token if optional_huggingface_token else \"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\"\n",
|
349 |
-
"user_header = f\"\\\"Authorization: Bearer {hf_token}\\\"\"\n",
|
|
|
350 |
"\n",
|
351 |
"def handle_manual(url):\n",
|
352 |
" original_url = url\n",
|
@@ -367,6 +368,7 @@
|
|
367 |
"\n",
|
368 |
"def manual_download(url, dst_dir, file_name):\n",
|
369 |
" basename = url.split(\"/\")[-1] if file_name is None else file_name\n",
|
|
|
370 |
"\n",
|
371 |
" # I do it at my own risk..... Fucking CivitAi >:(\n",
|
372 |
" civitai_token = \"62c0c5956b2f9defbd844d754000180b\"\n",
|
@@ -386,10 +388,10 @@
|
|
386 |
" if '/blob/' in url:\n",
|
387 |
" url = url.replace('/blob/', '/resolve/')\n",
|
388 |
" if file_name:\n",
|
389 |
-
" !aria2c --optimize-concurrent-downloads --console-log-level=error --summary-interval=10
|
390 |
" else:\n",
|
391 |
-
" parsed_link = '\\n{}\\n\\tout={
|
392 |
-
" !echo -e \"{parsed_link}\" | aria2c
|
393 |
" # -- Other --\n",
|
394 |
" elif 'http' in url or 'magnet' in url:\n",
|
395 |
" if file_name:\n",
|
|
|
345 |
"!mkdir -p {models_dir} {vaes_dir} {embeddings_dir} {loras_dir} {control_dir}\n",
|
346 |
"\n",
|
347 |
"url = \"\"\n",
|
348 |
+
"# hf_token = optional_huggingface_token if optional_huggingface_token else \"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\"\n",
|
349 |
+
"# user_header = f\"\\\"Authorization: Bearer {hf_token}\\\"\"\n",
|
350 |
+
"user_header = f\"\\\"Authorization: Bearer {optional_huggingface_token}\\\"\"\n",
|
351 |
"\n",
|
352 |
"def handle_manual(url):\n",
|
353 |
" original_url = url\n",
|
|
|
368 |
"\n",
|
369 |
"def manual_download(url, dst_dir, file_name):\n",
|
370 |
" basename = url.split(\"/\")[-1] if file_name is None else file_name\n",
|
371 |
+
" header_option = f\"--header={user_header}\" if optional_huggingface_token else \"\"\n",
|
372 |
"\n",
|
373 |
" # I do it at my own risk..... Fucking CivitAi >:(\n",
|
374 |
" civitai_token = \"62c0c5956b2f9defbd844d754000180b\"\n",
|
|
|
388 |
" if '/blob/' in url:\n",
|
389 |
" url = url.replace('/blob/', '/resolve/')\n",
|
390 |
" if file_name:\n",
|
391 |
+
" !aria2c {header_option} --optimize-concurrent-downloads --console-log-level=error --summary-interval=10 -c -j5 -x16 -s16 -k1M -d {dst_dir} -o {basename} {url}\n",
|
392 |
" else:\n",
|
393 |
+
" parsed_link = f'\\n{url}\\n\\tout={unquote(url.split(\"/\")[-1])}'\n",
|
394 |
+
" !echo -e \"{parsed_link}\" | aria2c {header_option} --console-log-level=error --summary-interval=10 -i- -j5 -x16 -s16 -k1M -c -d \"{dst_dir}\" -o {basename}\n",
|
395 |
" # -- Other --\n",
|
396 |
" elif 'http' in url or 'magnet' in url:\n",
|
397 |
" if file_name:\n",
|
files_cells/notebooks/ru/downloading_ru.ipynb
CHANGED
@@ -345,8 +345,9 @@
|
|
345 |
"!mkdir -p {models_dir} {vaes_dir} {embeddings_dir} {loras_dir} {control_dir}\n",
|
346 |
"\n",
|
347 |
"url = \"\"\n",
|
348 |
-
"hf_token = optional_huggingface_token if optional_huggingface_token else \"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\"\n",
|
349 |
-
"user_header = f\"\\\"Authorization: Bearer {hf_token}\\\"\"\n",
|
|
|
350 |
"\n",
|
351 |
"def handle_manual(url):\n",
|
352 |
" original_url = url\n",
|
@@ -367,6 +368,7 @@
|
|
367 |
"\n",
|
368 |
"def manual_download(url, dst_dir, file_name):\n",
|
369 |
" basename = url.split(\"/\")[-1] if file_name is None else file_name\n",
|
|
|
370 |
"\n",
|
371 |
" # I do it at my own risk..... Fucking CivitAi >:(\n",
|
372 |
" civitai_token = \"62c0c5956b2f9defbd844d754000180b\"\n",
|
@@ -386,10 +388,10 @@
|
|
386 |
" if '/blob/' in url:\n",
|
387 |
" url = url.replace('/blob/', '/resolve/')\n",
|
388 |
" if file_name:\n",
|
389 |
-
" !aria2c --optimize-concurrent-downloads --console-log-level=error --summary-interval=10
|
390 |
" else:\n",
|
391 |
-
" parsed_link = '\\n{}\\n\\tout={
|
392 |
-
" !echo -e \"{parsed_link}\" | aria2c
|
393 |
" # -- Other --\n",
|
394 |
" elif 'http' in url or 'magnet' in url:\n",
|
395 |
" if file_name:\n",
|
|
|
345 |
"!mkdir -p {models_dir} {vaes_dir} {embeddings_dir} {loras_dir} {control_dir}\n",
|
346 |
"\n",
|
347 |
"url = \"\"\n",
|
348 |
+
"# hf_token = optional_huggingface_token if optional_huggingface_token else \"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\"\n",
|
349 |
+
"# user_header = f\"\\\"Authorization: Bearer {hf_token}\\\"\"\n",
|
350 |
+
"user_header = f\"\\\"Authorization: Bearer {optional_huggingface_token}\\\"\"\n",
|
351 |
"\n",
|
352 |
"def handle_manual(url):\n",
|
353 |
" original_url = url\n",
|
|
|
368 |
"\n",
|
369 |
"def manual_download(url, dst_dir, file_name):\n",
|
370 |
" basename = url.split(\"/\")[-1] if file_name is None else file_name\n",
|
371 |
+
" header_option = f\"--header={user_header}\" if optional_huggingface_token else \"\"\n",
|
372 |
"\n",
|
373 |
" # I do it at my own risk..... Fucking CivitAi >:(\n",
|
374 |
" civitai_token = \"62c0c5956b2f9defbd844d754000180b\"\n",
|
|
|
388 |
" if '/blob/' in url:\n",
|
389 |
" url = url.replace('/blob/', '/resolve/')\n",
|
390 |
" if file_name:\n",
|
391 |
+
" !aria2c {header_option} --optimize-concurrent-downloads --console-log-level=error --summary-interval=10 -c -j5 -x16 -s16 -k1M -d {dst_dir} -o {basename} {url}\n",
|
392 |
" else:\n",
|
393 |
+
" parsed_link = f'\\n{url}\\n\\tout={unquote(url.split(\"/\")[-1])}'\n",
|
394 |
+
" !echo -e \"{parsed_link}\" | aria2c {header_option} --console-log-level=error --summary-interval=10 -i- -j5 -x16 -s16 -k1M -c -d \"{dst_dir}\" -o {basename}\n",
|
395 |
" # -- Other --\n",
|
396 |
" elif 'http' in url or 'magnet' in url:\n",
|
397 |
" if file_name:\n",
|
files_cells/python/en/downloading_en.py
CHANGED
@@ -326,8 +326,9 @@ prefixes = [
|
|
326 |
get_ipython().system('mkdir -p {models_dir} {vaes_dir} {embeddings_dir} {loras_dir} {control_dir}')
|
327 |
|
328 |
url = ""
|
329 |
-
hf_token = optional_huggingface_token if optional_huggingface_token else "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"
|
330 |
-
user_header = f"\"Authorization: Bearer {hf_token}\""
|
|
|
331 |
|
332 |
def handle_manual(url):
|
333 |
original_url = url
|
@@ -348,6 +349,7 @@ def handle_manual(url):
|
|
348 |
|
349 |
def manual_download(url, dst_dir, file_name):
|
350 |
basename = url.split("/")[-1] if file_name is None else file_name
|
|
|
351 |
|
352 |
# I do it at my own risk..... Fucking CivitAi >:(
|
353 |
civitai_token = "62c0c5956b2f9defbd844d754000180b"
|
@@ -367,10 +369,10 @@ def manual_download(url, dst_dir, file_name):
|
|
367 |
if '/blob/' in url:
|
368 |
url = url.replace('/blob/', '/resolve/')
|
369 |
if file_name:
|
370 |
-
get_ipython().system('aria2c --optimize-concurrent-downloads --console-log-level=error --summary-interval=10
|
371 |
else:
|
372 |
-
parsed_link = '\n{}\n\tout={
|
373 |
-
get_ipython().system('echo -e "{parsed_link}" | aria2c
|
374 |
# -- Other --
|
375 |
elif 'http' in url or 'magnet' in url:
|
376 |
if file_name:
|
|
|
326 |
get_ipython().system('mkdir -p {models_dir} {vaes_dir} {embeddings_dir} {loras_dir} {control_dir}')
|
327 |
|
328 |
url = ""
|
329 |
+
# hf_token = optional_huggingface_token if optional_huggingface_token else "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"
|
330 |
+
# user_header = f"\"Authorization: Bearer {hf_token}\""
|
331 |
+
user_header = f"\"Authorization: Bearer {optional_huggingface_token}\""
|
332 |
|
333 |
def handle_manual(url):
|
334 |
original_url = url
|
|
|
349 |
|
350 |
def manual_download(url, dst_dir, file_name):
|
351 |
basename = url.split("/")[-1] if file_name is None else file_name
|
352 |
+
header_option = f"--header={user_header}" if optional_huggingface_token else ""
|
353 |
|
354 |
# I do it at my own risk..... Fucking CivitAi >:(
|
355 |
civitai_token = "62c0c5956b2f9defbd844d754000180b"
|
|
|
369 |
if '/blob/' in url:
|
370 |
url = url.replace('/blob/', '/resolve/')
|
371 |
if file_name:
|
372 |
+
get_ipython().system('aria2c {header_option} --optimize-concurrent-downloads --console-log-level=error --summary-interval=10 -c -j5 -x16 -s16 -k1M -d {dst_dir} -o {basename} {url}')
|
373 |
else:
|
374 |
+
parsed_link = f'\n{url}\n\tout={unquote(url.split("/")[-1])}'
|
375 |
+
get_ipython().system('echo -e "{parsed_link}" | aria2c {header_option} --console-log-level=error --summary-interval=10 -i- -j5 -x16 -s16 -k1M -c -d "{dst_dir}" -o {basename}')
|
376 |
# -- Other --
|
377 |
elif 'http' in url or 'magnet' in url:
|
378 |
if file_name:
|
files_cells/python/ru/downloading_ru.py
CHANGED
@@ -326,8 +326,9 @@ prefixes = [
|
|
326 |
get_ipython().system('mkdir -p {models_dir} {vaes_dir} {embeddings_dir} {loras_dir} {control_dir}')
|
327 |
|
328 |
url = ""
|
329 |
-
hf_token = optional_huggingface_token if optional_huggingface_token else "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"
|
330 |
-
user_header = f"\"Authorization: Bearer {hf_token}\""
|
|
|
331 |
|
332 |
def handle_manual(url):
|
333 |
original_url = url
|
@@ -348,6 +349,7 @@ def handle_manual(url):
|
|
348 |
|
349 |
def manual_download(url, dst_dir, file_name):
|
350 |
basename = url.split("/")[-1] if file_name is None else file_name
|
|
|
351 |
|
352 |
# I do it at my own risk..... Fucking CivitAi >:(
|
353 |
civitai_token = "62c0c5956b2f9defbd844d754000180b"
|
@@ -367,10 +369,10 @@ def manual_download(url, dst_dir, file_name):
|
|
367 |
if '/blob/' in url:
|
368 |
url = url.replace('/blob/', '/resolve/')
|
369 |
if file_name:
|
370 |
-
get_ipython().system('aria2c --optimize-concurrent-downloads --console-log-level=error --summary-interval=10
|
371 |
else:
|
372 |
-
parsed_link = '\n{}\n\tout={
|
373 |
-
get_ipython().system('echo -e "{parsed_link}" | aria2c
|
374 |
# -- Other --
|
375 |
elif 'http' in url or 'magnet' in url:
|
376 |
if file_name:
|
|
|
326 |
get_ipython().system('mkdir -p {models_dir} {vaes_dir} {embeddings_dir} {loras_dir} {control_dir}')
|
327 |
|
328 |
url = ""
|
329 |
+
# hf_token = optional_huggingface_token if optional_huggingface_token else "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"
|
330 |
+
# user_header = f"\"Authorization: Bearer {hf_token}\""
|
331 |
+
user_header = f"\"Authorization: Bearer {optional_huggingface_token}\""
|
332 |
|
333 |
def handle_manual(url):
|
334 |
original_url = url
|
|
|
349 |
|
350 |
def manual_download(url, dst_dir, file_name):
|
351 |
basename = url.split("/")[-1] if file_name is None else file_name
|
352 |
+
header_option = f"--header={user_header}" if optional_huggingface_token else ""
|
353 |
|
354 |
# I do it at my own risk..... Fucking CivitAi >:(
|
355 |
civitai_token = "62c0c5956b2f9defbd844d754000180b"
|
|
|
369 |
if '/blob/' in url:
|
370 |
url = url.replace('/blob/', '/resolve/')
|
371 |
if file_name:
|
372 |
+
get_ipython().system('aria2c {header_option} --optimize-concurrent-downloads --console-log-level=error --summary-interval=10 -c -j5 -x16 -s16 -k1M -d {dst_dir} -o {basename} {url}')
|
373 |
else:
|
374 |
+
parsed_link = f'\n{url}\n\tout={unquote(url.split("/")[-1])}'
|
375 |
+
get_ipython().system('echo -e "{parsed_link}" | aria2c {header_option} --console-log-level=error --summary-interval=10 -i- -j5 -x16 -s16 -k1M -c -d "{dst_dir}" -o {basename}')
|
376 |
# -- Other --
|
377 |
elif 'http' in url or 'magnet' in url:
|
378 |
if file_name:
|