test...
Browse files- files_cells/notebooks/en/auto-cleaner_en.ipynb +3 -2
- files_cells/notebooks/en/downloading_en.ipynb +3 -1
- files_cells/notebooks/en/launch_en.ipynb +2 -4
- files_cells/notebooks/ru/auto-cleaner_ru.ipynb +3 -2
- files_cells/notebooks/ru/downloading_ru.ipynb +4 -2
- files_cells/notebooks/ru/launch_ru.ipynb +2 -4
- files_cells/python/en/downloading_en.py +3 -1
- files_cells/python/en/launch_en.py +2 -4
- files_cells/python/ru/downloading_ru.py +7 -5
- files_cells/python/ru/launch_ru.py +2 -4
files_cells/notebooks/en/auto-cleaner_en.ipynb
CHANGED
|
@@ -266,10 +266,11 @@
|
|
| 266 |
" deleted_files = 0\n",
|
| 267 |
" for root, dirs, files in os.walk(directory):\n",
|
| 268 |
" for file in files:\n",
|
| 269 |
-
" if file.endswith(
|
| 270 |
" continue\n",
|
| 271 |
" os.remove(os.path.join(root, file))\n",
|
| 272 |
-
"
|
|
|
|
| 273 |
" return deleted_files\n",
|
| 274 |
"\n",
|
| 275 |
"\n",
|
|
|
|
| 266 |
" deleted_files = 0\n",
|
| 267 |
" for root, dirs, files in os.walk(directory):\n",
|
| 268 |
" for file in files:\n",
|
| 269 |
+
" if file.endswith(\".txt\"):\n",
|
| 270 |
" continue\n",
|
| 271 |
" os.remove(os.path.join(root, file))\n",
|
| 272 |
+
" if not file.endswith(\".yaml\"):\n",
|
| 273 |
+
" deleted_files += 1\n",
|
| 274 |
" return deleted_files\n",
|
| 275 |
"\n",
|
| 276 |
"\n",
|
files_cells/notebooks/en/downloading_en.ipynb
CHANGED
|
@@ -116,7 +116,7 @@
|
|
| 116 |
" 'Vae', 'Vae_Num',\n",
|
| 117 |
" 'latest_webui', 'latest_exstensions', 'detailed_download',\n",
|
| 118 |
" 'controlnet', 'controlnet_Num', 'commit_hash', 'optional_huggingface_token',\n",
|
| 119 |
-
" 'ngrok_token' 'commandline_arguments',\n",
|
| 120 |
" 'Model_url', 'Vae_url', 'LoRA_url', 'Embedding_url', 'Extensions_url', 'custom_file_urls'\n",
|
| 121 |
"]\n",
|
| 122 |
"\n",
|
|
@@ -372,6 +372,8 @@
|
|
| 372 |
" if 'civitai' in url and civitai_token:\n",
|
| 373 |
" url = f\"{url}?token={civitai_token}\"\n",
|
| 374 |
"\n",
|
|
|
|
|
|
|
| 375 |
" # -- GDrive --\n",
|
| 376 |
" if 'drive.google' in url:\n",
|
| 377 |
" if 'folders' in url:\n",
|
|
|
|
| 116 |
" 'Vae', 'Vae_Num',\n",
|
| 117 |
" 'latest_webui', 'latest_exstensions', 'detailed_download',\n",
|
| 118 |
" 'controlnet', 'controlnet_Num', 'commit_hash', 'optional_huggingface_token',\n",
|
| 119 |
+
" 'ngrok_token', 'commandline_arguments',\n",
|
| 120 |
" 'Model_url', 'Vae_url', 'LoRA_url', 'Embedding_url', 'Extensions_url', 'custom_file_urls'\n",
|
| 121 |
"]\n",
|
| 122 |
"\n",
|
|
|
|
| 372 |
" if 'civitai' in url and civitai_token:\n",
|
| 373 |
" url = f\"{url}?token={civitai_token}\"\n",
|
| 374 |
"\n",
|
| 375 |
+
" print(\"\\033[32m---\"*45 + f\"\\n\\033[33mURL: \\033[34m{url}\\n\\033[33mSAVE DIR: \\033[34m{dst_dir}\\n\\033[33mFILE NAME: \\033[34m{file_name}\\033[32m\\n~~~\\033[0m\")\n",
|
| 376 |
+
"\n",
|
| 377 |
" # -- GDrive --\n",
|
| 378 |
" if 'drive.google' in url:\n",
|
| 379 |
" if 'folders' in url:\n",
|
files_cells/notebooks/en/launch_en.ipynb
CHANGED
|
@@ -68,7 +68,6 @@
|
|
| 68 |
"if env != \"SageMaker Studio Lab\":\n",
|
| 69 |
" import cloudpickle as pickle\n",
|
| 70 |
"\n",
|
| 71 |
-
" password = \"x1101\"\n",
|
| 72 |
" def get_public_ip(version='ipv4'):\n",
|
| 73 |
" try:\n",
|
| 74 |
" url = f'https://api64.ipify.org?format=json&{version}=true'\n",
|
|
@@ -82,7 +81,7 @@
|
|
| 82 |
" public_ipv4 = get_public_ip(version='ipv4')\n",
|
| 83 |
"\n",
|
| 84 |
" tunnel_class = pickle.load(open(f\"{root_path}/new_tunnel\", \"rb\"), encoding=\"utf-8\")\n",
|
| 85 |
-
" tunnel_port=
|
| 86 |
" tunnel = tunnel_class(tunnel_port)\n",
|
| 87 |
" tunnel.add_tunnel(command=\"cl tunnel --url localhost:{port}\", name=\"cl\", pattern=re.compile(r\"[\\w-]+\\.trycloudflare\\.com\"))\n",
|
| 88 |
" tunnel.add_tunnel(command=\"lt --port {port}\", name=\"lt\", pattern=re.compile(r\"[\\w-]+\\.loca\\.lt\"), note=\"Password : \" + \"\\033[32m\" + public_ipv4 + \"\\033[0m\" + \" rerun cell if 404 error.\")\n",
|
|
@@ -98,9 +97,8 @@
|
|
| 98 |
"\n",
|
| 99 |
"if env != \"SageMaker Studio Lab\":\n",
|
| 100 |
" with tunnel:\n",
|
| 101 |
-
" !#python -m http.server 1101\n",
|
| 102 |
" %cd {webui_path}\n",
|
| 103 |
-
" commandline_arguments += f\" --port=
|
| 104 |
"\n",
|
| 105 |
" if ngrok_token:\n",
|
| 106 |
" commandline_arguments += ' --ngrok ' + ngrok_token\n",
|
|
|
|
| 68 |
"if env != \"SageMaker Studio Lab\":\n",
|
| 69 |
" import cloudpickle as pickle\n",
|
| 70 |
"\n",
|
|
|
|
| 71 |
" def get_public_ip(version='ipv4'):\n",
|
| 72 |
" try:\n",
|
| 73 |
" url = f'https://api64.ipify.org?format=json&{version}=true'\n",
|
|
|
|
| 81 |
" public_ipv4 = get_public_ip(version='ipv4')\n",
|
| 82 |
"\n",
|
| 83 |
" tunnel_class = pickle.load(open(f\"{root_path}/new_tunnel\", \"rb\"), encoding=\"utf-8\")\n",
|
| 84 |
+
" tunnel_port= 1769\n",
|
| 85 |
" tunnel = tunnel_class(tunnel_port)\n",
|
| 86 |
" tunnel.add_tunnel(command=\"cl tunnel --url localhost:{port}\", name=\"cl\", pattern=re.compile(r\"[\\w-]+\\.trycloudflare\\.com\"))\n",
|
| 87 |
" tunnel.add_tunnel(command=\"lt --port {port}\", name=\"lt\", pattern=re.compile(r\"[\\w-]+\\.loca\\.lt\"), note=\"Password : \" + \"\\033[32m\" + public_ipv4 + \"\\033[0m\" + \" rerun cell if 404 error.\")\n",
|
|
|
|
| 97 |
"\n",
|
| 98 |
"if env != \"SageMaker Studio Lab\":\n",
|
| 99 |
" with tunnel:\n",
|
|
|
|
| 100 |
" %cd {webui_path}\n",
|
| 101 |
+
" commandline_arguments += f\" --port=1769\"\n",
|
| 102 |
"\n",
|
| 103 |
" if ngrok_token:\n",
|
| 104 |
" commandline_arguments += ' --ngrok ' + ngrok_token\n",
|
files_cells/notebooks/ru/auto-cleaner_ru.ipynb
CHANGED
|
@@ -266,10 +266,11 @@
|
|
| 266 |
" deleted_files = 0\n",
|
| 267 |
" for root, dirs, files in os.walk(directory):\n",
|
| 268 |
" for file in files:\n",
|
| 269 |
-
" if file.endswith(
|
| 270 |
" continue\n",
|
| 271 |
" os.remove(os.path.join(root, file))\n",
|
| 272 |
-
"
|
|
|
|
| 273 |
" return deleted_files\n",
|
| 274 |
"\n",
|
| 275 |
"\n",
|
|
|
|
| 266 |
" deleted_files = 0\n",
|
| 267 |
" for root, dirs, files in os.walk(directory):\n",
|
| 268 |
" for file in files:\n",
|
| 269 |
+
" if file.endswith(\".txt\"):\n",
|
| 270 |
" continue\n",
|
| 271 |
" os.remove(os.path.join(root, file))\n",
|
| 272 |
+
" if not file.endswith(\".yaml\"):\n",
|
| 273 |
+
" deleted_files += 1\n",
|
| 274 |
" return deleted_files\n",
|
| 275 |
"\n",
|
| 276 |
"\n",
|
files_cells/notebooks/ru/downloading_ru.ipynb
CHANGED
|
@@ -91,7 +91,7 @@
|
|
| 91 |
" if env == \"Google Colab\":\n",
|
| 92 |
" !pip install -q {torch} -U\n",
|
| 93 |
" else:\n",
|
| 94 |
-
" !pip install -q {torch} -U\n",
|
| 95 |
" !pip install -q {xformers} -U\n",
|
| 96 |
"\n",
|
| 97 |
" with open(flag_file, \"w\") as f:\n",
|
|
@@ -116,7 +116,7 @@
|
|
| 116 |
" 'Vae', 'Vae_Num',\n",
|
| 117 |
" 'latest_webui', 'latest_exstensions', 'detailed_download',\n",
|
| 118 |
" 'controlnet', 'controlnet_Num', 'commit_hash', 'optional_huggingface_token',\n",
|
| 119 |
-
" 'ngrok_token' 'commandline_arguments',\n",
|
| 120 |
" 'Model_url', 'Vae_url', 'LoRA_url', 'Embedding_url', 'Extensions_url', 'custom_file_urls'\n",
|
| 121 |
"]\n",
|
| 122 |
"\n",
|
|
@@ -372,6 +372,8 @@
|
|
| 372 |
" if 'civitai' in url and civitai_token:\n",
|
| 373 |
" url = f\"{url}?token={civitai_token}\"\n",
|
| 374 |
"\n",
|
|
|
|
|
|
|
| 375 |
" # -- GDrive --\n",
|
| 376 |
" if 'drive.google' in url:\n",
|
| 377 |
" if 'folders' in url:\n",
|
|
|
|
| 91 |
" if env == \"Google Colab\":\n",
|
| 92 |
" !pip install -q {torch} -U\n",
|
| 93 |
" else:\n",
|
| 94 |
+
" # !pip install -q {torch} -U\n",
|
| 95 |
" !pip install -q {xformers} -U\n",
|
| 96 |
"\n",
|
| 97 |
" with open(flag_file, \"w\") as f:\n",
|
|
|
|
| 116 |
" 'Vae', 'Vae_Num',\n",
|
| 117 |
" 'latest_webui', 'latest_exstensions', 'detailed_download',\n",
|
| 118 |
" 'controlnet', 'controlnet_Num', 'commit_hash', 'optional_huggingface_token',\n",
|
| 119 |
+
" 'ngrok_token', 'commandline_arguments',\n",
|
| 120 |
" 'Model_url', 'Vae_url', 'LoRA_url', 'Embedding_url', 'Extensions_url', 'custom_file_urls'\n",
|
| 121 |
"]\n",
|
| 122 |
"\n",
|
|
|
|
| 372 |
" if 'civitai' in url and civitai_token:\n",
|
| 373 |
" url = f\"{url}?token={civitai_token}\"\n",
|
| 374 |
"\n",
|
| 375 |
+
" print(\"\\033[32m---\"*45 + f\"\\n\\033[33mURL: \\033[34m{url}\\n\\033[33mSAVE DIR: \\033[34m{dst_dir}\\n\\033[33mFILE NAME: \\033[34m{file_name}\\033[32m\\n~~~\\033[0m\")\n",
|
| 376 |
+
"\n",
|
| 377 |
" # -- GDrive --\n",
|
| 378 |
" if 'drive.google' in url:\n",
|
| 379 |
" if 'folders' in url:\n",
|
files_cells/notebooks/ru/launch_ru.ipynb
CHANGED
|
@@ -68,7 +68,6 @@
|
|
| 68 |
"if env != \"SageMaker Studio Lab\":\n",
|
| 69 |
" import cloudpickle as pickle\n",
|
| 70 |
"\n",
|
| 71 |
-
" password = \"x1101\"\n",
|
| 72 |
" def get_public_ip(version='ipv4'):\n",
|
| 73 |
" try:\n",
|
| 74 |
" url = f'https://api64.ipify.org?format=json&{version}=true'\n",
|
|
@@ -82,7 +81,7 @@
|
|
| 82 |
" public_ipv4 = get_public_ip(version='ipv4')\n",
|
| 83 |
"\n",
|
| 84 |
" tunnel_class = pickle.load(open(f\"{root_path}/new_tunnel\", \"rb\"), encoding=\"utf-8\")\n",
|
| 85 |
-
" tunnel_port=
|
| 86 |
" tunnel = tunnel_class(tunnel_port)\n",
|
| 87 |
" tunnel.add_tunnel(command=\"cl tunnel --url localhost:{port}\", name=\"cl\", pattern=re.compile(r\"[\\w-]+\\.trycloudflare\\.com\"))\n",
|
| 88 |
" tunnel.add_tunnel(command=\"lt --port {port}\", name=\"lt\", pattern=re.compile(r\"[\\w-]+\\.loca\\.lt\"), note=\"Password : \" + \"\\033[32m\" + public_ipv4 + \"\\033[0m\" + \" rerun cell if 404 error.\")\n",
|
|
@@ -98,9 +97,8 @@
|
|
| 98 |
"\n",
|
| 99 |
"if env != \"SageMaker Studio Lab\":\n",
|
| 100 |
" with tunnel:\n",
|
| 101 |
-
" !#python -m http.server 1101\n",
|
| 102 |
" %cd {webui_path}\n",
|
| 103 |
-
" commandline_arguments += f\" --port=
|
| 104 |
"\n",
|
| 105 |
" if ngrok_token:\n",
|
| 106 |
" commandline_arguments += ' --ngrok ' + ngrok_token\n",
|
|
|
|
| 68 |
"if env != \"SageMaker Studio Lab\":\n",
|
| 69 |
" import cloudpickle as pickle\n",
|
| 70 |
"\n",
|
|
|
|
| 71 |
" def get_public_ip(version='ipv4'):\n",
|
| 72 |
" try:\n",
|
| 73 |
" url = f'https://api64.ipify.org?format=json&{version}=true'\n",
|
|
|
|
| 81 |
" public_ipv4 = get_public_ip(version='ipv4')\n",
|
| 82 |
"\n",
|
| 83 |
" tunnel_class = pickle.load(open(f\"{root_path}/new_tunnel\", \"rb\"), encoding=\"utf-8\")\n",
|
| 84 |
+
" tunnel_port= 1769\n",
|
| 85 |
" tunnel = tunnel_class(tunnel_port)\n",
|
| 86 |
" tunnel.add_tunnel(command=\"cl tunnel --url localhost:{port}\", name=\"cl\", pattern=re.compile(r\"[\\w-]+\\.trycloudflare\\.com\"))\n",
|
| 87 |
" tunnel.add_tunnel(command=\"lt --port {port}\", name=\"lt\", pattern=re.compile(r\"[\\w-]+\\.loca\\.lt\"), note=\"Password : \" + \"\\033[32m\" + public_ipv4 + \"\\033[0m\" + \" rerun cell if 404 error.\")\n",
|
|
|
|
| 97 |
"\n",
|
| 98 |
"if env != \"SageMaker Studio Lab\":\n",
|
| 99 |
" with tunnel:\n",
|
|
|
|
| 100 |
" %cd {webui_path}\n",
|
| 101 |
+
" commandline_arguments += f\" --port=1769\"\n",
|
| 102 |
"\n",
|
| 103 |
" if ngrok_token:\n",
|
| 104 |
" commandline_arguments += ' --ngrok ' + ngrok_token\n",
|
files_cells/python/en/downloading_en.py
CHANGED
|
@@ -97,7 +97,7 @@ variables = [
|
|
| 97 |
'Vae', 'Vae_Num',
|
| 98 |
'latest_webui', 'latest_exstensions', 'detailed_download',
|
| 99 |
'controlnet', 'controlnet_Num', 'commit_hash', 'optional_huggingface_token',
|
| 100 |
-
'ngrok_token' 'commandline_arguments',
|
| 101 |
'Model_url', 'Vae_url', 'LoRA_url', 'Embedding_url', 'Extensions_url', 'custom_file_urls'
|
| 102 |
]
|
| 103 |
|
|
@@ -353,6 +353,8 @@ def manual_download(url, dst_dir, file_name):
|
|
| 353 |
if 'civitai' in url and civitai_token:
|
| 354 |
url = f"{url}?token={civitai_token}"
|
| 355 |
|
|
|
|
|
|
|
| 356 |
# -- GDrive --
|
| 357 |
if 'drive.google' in url:
|
| 358 |
if 'folders' in url:
|
|
|
|
| 97 |
'Vae', 'Vae_Num',
|
| 98 |
'latest_webui', 'latest_exstensions', 'detailed_download',
|
| 99 |
'controlnet', 'controlnet_Num', 'commit_hash', 'optional_huggingface_token',
|
| 100 |
+
'ngrok_token', 'commandline_arguments',
|
| 101 |
'Model_url', 'Vae_url', 'LoRA_url', 'Embedding_url', 'Extensions_url', 'custom_file_urls'
|
| 102 |
]
|
| 103 |
|
|
|
|
| 353 |
if 'civitai' in url and civitai_token:
|
| 354 |
url = f"{url}?token={civitai_token}"
|
| 355 |
|
| 356 |
+
print("\033[32m---"*45 + f"\n\033[33mURL: \033[34m{url}\n\033[33mSAVE DIR: \033[34m{dst_dir}\n\033[33mFILE NAME: \033[34m{file_name}\033[32m\n~~~\033[0m")
|
| 357 |
+
|
| 358 |
# -- GDrive --
|
| 359 |
if 'drive.google' in url:
|
| 360 |
if 'folders' in url:
|
files_cells/python/en/launch_en.py
CHANGED
|
@@ -44,7 +44,6 @@ commandline_arguments = settings['commandline_arguments']
|
|
| 44 |
if env != "SageMaker Studio Lab":
|
| 45 |
import cloudpickle as pickle
|
| 46 |
|
| 47 |
-
password = "x1101"
|
| 48 |
def get_public_ip(version='ipv4'):
|
| 49 |
try:
|
| 50 |
url = f'https://api64.ipify.org?format=json&{version}=true'
|
|
@@ -58,7 +57,7 @@ if env != "SageMaker Studio Lab":
|
|
| 58 |
public_ipv4 = get_public_ip(version='ipv4')
|
| 59 |
|
| 60 |
tunnel_class = pickle.load(open(f"{root_path}/new_tunnel", "rb"), encoding="utf-8")
|
| 61 |
-
tunnel_port=
|
| 62 |
tunnel = tunnel_class(tunnel_port)
|
| 63 |
tunnel.add_tunnel(command="cl tunnel --url localhost:{port}", name="cl", pattern=re.compile(r"[\w-]+\.trycloudflare\.com"))
|
| 64 |
tunnel.add_tunnel(command="lt --port {port}", name="lt", pattern=re.compile(r"[\w-]+\.loca\.lt"), note="Password : " + "\033[32m" + public_ipv4 + "\033[0m" + " rerun cell if 404 error.")
|
|
@@ -74,9 +73,8 @@ get_ipython().system('sed -i \'s/"sd_checkpoint_hash": ".*"/"sd_checkpoint_hash"
|
|
| 74 |
|
| 75 |
if env != "SageMaker Studio Lab":
|
| 76 |
with tunnel:
|
| 77 |
-
get_ipython().system('#python -m http.server 1101')
|
| 78 |
get_ipython().run_line_magic('cd', '{webui_path}')
|
| 79 |
-
commandline_arguments += f" --port=
|
| 80 |
|
| 81 |
if ngrok_token:
|
| 82 |
commandline_arguments += ' --ngrok ' + ngrok_token
|
|
|
|
| 44 |
if env != "SageMaker Studio Lab":
|
| 45 |
import cloudpickle as pickle
|
| 46 |
|
|
|
|
| 47 |
def get_public_ip(version='ipv4'):
|
| 48 |
try:
|
| 49 |
url = f'https://api64.ipify.org?format=json&{version}=true'
|
|
|
|
| 57 |
public_ipv4 = get_public_ip(version='ipv4')
|
| 58 |
|
| 59 |
tunnel_class = pickle.load(open(f"{root_path}/new_tunnel", "rb"), encoding="utf-8")
|
| 60 |
+
tunnel_port= 1769
|
| 61 |
tunnel = tunnel_class(tunnel_port)
|
| 62 |
tunnel.add_tunnel(command="cl tunnel --url localhost:{port}", name="cl", pattern=re.compile(r"[\w-]+\.trycloudflare\.com"))
|
| 63 |
tunnel.add_tunnel(command="lt --port {port}", name="lt", pattern=re.compile(r"[\w-]+\.loca\.lt"), note="Password : " + "\033[32m" + public_ipv4 + "\033[0m" + " rerun cell if 404 error.")
|
|
|
|
| 73 |
|
| 74 |
if env != "SageMaker Studio Lab":
|
| 75 |
with tunnel:
|
|
|
|
| 76 |
get_ipython().run_line_magic('cd', '{webui_path}')
|
| 77 |
+
commandline_arguments += f" --port=1769"
|
| 78 |
|
| 79 |
if ngrok_token:
|
| 80 |
commandline_arguments += ' --ngrok ' + ngrok_token
|
files_cells/python/ru/downloading_ru.py
CHANGED
|
@@ -97,7 +97,7 @@ variables = [
|
|
| 97 |
'Vae', 'Vae_Num',
|
| 98 |
'latest_webui', 'latest_exstensions', 'detailed_download',
|
| 99 |
'controlnet', 'controlnet_Num', 'commit_hash', 'optional_huggingface_token',
|
| 100 |
-
'ngrok_token' 'commandline_arguments',
|
| 101 |
'Model_url', 'Vae_url', 'LoRA_url', 'Embedding_url', 'Extensions_url', 'custom_file_urls'
|
| 102 |
]
|
| 103 |
|
|
@@ -172,18 +172,18 @@ if latest_webui or latest_exstensions:
|
|
| 172 |
else:
|
| 173 |
get_ipython().system('{\'for dir in /home/studio-lab-user/content/sdw/extensions/*/; do cd \\"$dir\\" && git fetch origin && git pull; done\'}')
|
| 174 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 175 |
get_ipython().system('cd {webui_path}/repositories/stable-diffusion-stability-ai && git restore .')
|
| 176 |
del cap
|
| 177 |
print(f"\r✨ {action} Завершено!")
|
| 178 |
|
| 179 |
|
| 180 |
# === FIXING ERRORS ===
|
| 181 |
-
# --- All ---
|
| 182 |
# --- Encrypt-Image ---
|
| 183 |
get_ipython().system("sed -i '9,37d' {webui_path}/extensions/Encrypt-Image/javascript/encrypt_images_info.js")
|
| 184 |
-
if env = "Google Colab":
|
| 185 |
-
if os.path.exists(f"{webui_path}/extensions/Encrypt-Image"):
|
| 186 |
-
get_ipython().system('rm -rf {webui_path}/extensions/Encrypt-Image')
|
| 187 |
|
| 188 |
# --- SageMaker ---
|
| 189 |
if env == "SageMaker Studio Lab":
|
|
@@ -353,6 +353,8 @@ def manual_download(url, dst_dir, file_name):
|
|
| 353 |
if 'civitai' in url and civitai_token:
|
| 354 |
url = f"{url}?token={civitai_token}"
|
| 355 |
|
|
|
|
|
|
|
| 356 |
# -- GDrive --
|
| 357 |
if 'drive.google' in url:
|
| 358 |
if 'folders' in url:
|
|
|
|
| 97 |
'Vae', 'Vae_Num',
|
| 98 |
'latest_webui', 'latest_exstensions', 'detailed_download',
|
| 99 |
'controlnet', 'controlnet_Num', 'commit_hash', 'optional_huggingface_token',
|
| 100 |
+
'ngrok_token', 'commandline_arguments',
|
| 101 |
'Model_url', 'Vae_url', 'LoRA_url', 'Embedding_url', 'Extensions_url', 'custom_file_urls'
|
| 102 |
]
|
| 103 |
|
|
|
|
| 172 |
else:
|
| 173 |
get_ipython().system('{\'for dir in /home/studio-lab-user/content/sdw/extensions/*/; do cd \\"$dir\\" && git fetch origin && git pull; done\'}')
|
| 174 |
|
| 175 |
+
# My Chinese friend, you broke the images again in the latest update... >W<'
|
| 176 |
+
get_ipython().run_line_magic('cd', '{webui_path}/extensions/Encrypt-Image')
|
| 177 |
+
get_ipython().system('git reset --hard 376358d8854472b9ea50e9fc8800367d1ca51137 # stable commit :3')
|
| 178 |
+
|
| 179 |
get_ipython().system('cd {webui_path}/repositories/stable-diffusion-stability-ai && git restore .')
|
| 180 |
del cap
|
| 181 |
print(f"\r✨ {action} Завершено!")
|
| 182 |
|
| 183 |
|
| 184 |
# === FIXING ERRORS ===
|
|
|
|
| 185 |
# --- Encrypt-Image ---
|
| 186 |
get_ipython().system("sed -i '9,37d' {webui_path}/extensions/Encrypt-Image/javascript/encrypt_images_info.js")
|
|
|
|
|
|
|
|
|
|
| 187 |
|
| 188 |
# --- SageMaker ---
|
| 189 |
if env == "SageMaker Studio Lab":
|
|
|
|
| 353 |
if 'civitai' in url and civitai_token:
|
| 354 |
url = f"{url}?token={civitai_token}"
|
| 355 |
|
| 356 |
+
print("\033[32m---"*45 + f"\n\033[33mURL: \033[34m{url}\n\033[33mSAVE DIR: \033[34m{dst_dir}\n\033[33mFILE NAME: \033[34m{file_name}\033[32m\n~~~\033[0m")
|
| 357 |
+
|
| 358 |
# -- GDrive --
|
| 359 |
if 'drive.google' in url:
|
| 360 |
if 'folders' in url:
|
files_cells/python/ru/launch_ru.py
CHANGED
|
@@ -44,7 +44,6 @@ commandline_arguments = settings['commandline_arguments']
|
|
| 44 |
if env != "SageMaker Studio Lab":
|
| 45 |
import cloudpickle as pickle
|
| 46 |
|
| 47 |
-
password = "x1101"
|
| 48 |
def get_public_ip(version='ipv4'):
|
| 49 |
try:
|
| 50 |
url = f'https://api64.ipify.org?format=json&{version}=true'
|
|
@@ -58,7 +57,7 @@ if env != "SageMaker Studio Lab":
|
|
| 58 |
public_ipv4 = get_public_ip(version='ipv4')
|
| 59 |
|
| 60 |
tunnel_class = pickle.load(open(f"{root_path}/new_tunnel", "rb"), encoding="utf-8")
|
| 61 |
-
tunnel_port=
|
| 62 |
tunnel = tunnel_class(tunnel_port)
|
| 63 |
tunnel.add_tunnel(command="cl tunnel --url localhost:{port}", name="cl", pattern=re.compile(r"[\w-]+\.trycloudflare\.com"))
|
| 64 |
tunnel.add_tunnel(command="lt --port {port}", name="lt", pattern=re.compile(r"[\w-]+\.loca\.lt"), note="Password : " + "\033[32m" + public_ipv4 + "\033[0m" + " rerun cell if 404 error.")
|
|
@@ -74,9 +73,8 @@ get_ipython().system('sed -i \'s/"sd_checkpoint_hash": ".*"/"sd_checkpoint_hash"
|
|
| 74 |
|
| 75 |
if env != "SageMaker Studio Lab":
|
| 76 |
with tunnel:
|
| 77 |
-
get_ipython().system('#python -m http.server 1101')
|
| 78 |
get_ipython().run_line_magic('cd', '{webui_path}')
|
| 79 |
-
commandline_arguments += f" --port=
|
| 80 |
|
| 81 |
if ngrok_token:
|
| 82 |
commandline_arguments += ' --ngrok ' + ngrok_token
|
|
|
|
| 44 |
if env != "SageMaker Studio Lab":
|
| 45 |
import cloudpickle as pickle
|
| 46 |
|
|
|
|
| 47 |
def get_public_ip(version='ipv4'):
|
| 48 |
try:
|
| 49 |
url = f'https://api64.ipify.org?format=json&{version}=true'
|
|
|
|
| 57 |
public_ipv4 = get_public_ip(version='ipv4')
|
| 58 |
|
| 59 |
tunnel_class = pickle.load(open(f"{root_path}/new_tunnel", "rb"), encoding="utf-8")
|
| 60 |
+
tunnel_port= 1769
|
| 61 |
tunnel = tunnel_class(tunnel_port)
|
| 62 |
tunnel.add_tunnel(command="cl tunnel --url localhost:{port}", name="cl", pattern=re.compile(r"[\w-]+\.trycloudflare\.com"))
|
| 63 |
tunnel.add_tunnel(command="lt --port {port}", name="lt", pattern=re.compile(r"[\w-]+\.loca\.lt"), note="Password : " + "\033[32m" + public_ipv4 + "\033[0m" + " rerun cell if 404 error.")
|
|
|
|
| 73 |
|
| 74 |
if env != "SageMaker Studio Lab":
|
| 75 |
with tunnel:
|
|
|
|
| 76 |
get_ipython().run_line_magic('cd', '{webui_path}')
|
| 77 |
+
commandline_arguments += f" --port=1769"
|
| 78 |
|
| 79 |
if ngrok_token:
|
| 80 |
commandline_arguments += ' --ngrok ' + ngrok_token
|