hmm??
Browse files- files_cells/notebooks/en/downloading_en.ipynb +7 -9
- files_cells/notebooks/en/launch_en.ipynb +4 -2
- files_cells/notebooks/en/widgets_en.ipynb +1 -1
- files_cells/notebooks/ru/downloading_ru.ipynb +7 -9
- files_cells/notebooks/ru/launch_ru.ipynb +4 -2
- files_cells/notebooks/ru/widgets_ru.ipynb +1 -1
- files_cells/python/en/downloading_en.py +7 -9
- files_cells/python/en/launch_en.py +4 -2
- files_cells/python/en/widgets_en.py +1 -1
- files_cells/python/ru/downloading_ru.py +7 -9
- files_cells/python/ru/launch_ru.py +4 -2
- files_cells/python/ru/widgets_ru.py +1 -1
files_cells/notebooks/en/downloading_en.ipynb
CHANGED
|
@@ -138,7 +138,7 @@
|
|
| 138 |
" 'models/ControlNet'\n",
|
| 139 |
" ]\n",
|
| 140 |
"\n",
|
| 141 |
-
" print(\"Moving files...\", end='')\n",
|
| 142 |
" time.sleep(1)\n",
|
| 143 |
" for item in items_to_copy:\n",
|
| 144 |
" src = os.path.join(src_base, item)\n",
|
|
@@ -151,12 +151,6 @@
|
|
| 151 |
" shutil.move(src, dst)\n",
|
| 152 |
" print(\"\\r🔥 Files moved!\" + \" \"*15)\n",
|
| 153 |
"\n",
|
| 154 |
-
"def download_and_unpack(url, dest_path):\n",
|
| 155 |
-
" aria2_args = \"--console-log-level=error -c -x 16 -s 16 -k 1M\"\n",
|
| 156 |
-
" !aria2c {aria2_args} '{url}' -o repo.zip\n",
|
| 157 |
-
" !unzip -q -o repo.zip -d {dest_path}\n",
|
| 158 |
-
" !rm -rf repo.zip\n",
|
| 159 |
-
"\n",
|
| 160 |
"def handle_colab_timer(webui_path, timer_colab):\n",
|
| 161 |
" timer_file_path = os.path.join(webui_path, 'static', 'colabTimer.txt')\n",
|
| 162 |
" if not os.path.exists(timer_file_path):\n",
|
|
@@ -176,7 +170,11 @@
|
|
| 176 |
" if UI == 'Forge':\n",
|
| 177 |
" download_url = \"https://huggingface.co/NagisaNao/fast_repo/resolve/main/FULL_REPO_forge.zip\"\n",
|
| 178 |
"\n",
|
| 179 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 180 |
"\n",
|
| 181 |
" get_ipython().system(f'echo -n {start_colab} > {webui_path}/static/colabTimer.txt')\n",
|
| 182 |
" del cap\n",
|
|
@@ -192,7 +190,7 @@
|
|
| 192 |
"# ================= MAIN CODE ==================\n",
|
| 193 |
"if os.path.exists(webui_path):\n",
|
| 194 |
" if UI != OLD_UI:\n",
|
| 195 |
-
" print(f'Switching the WebUI from \\033[33m{OLD_UI}\\033[0m to \\033[33m{UI}\\033[0m
|
| 196 |
" copy_items_with_replace(webui_path, temporarily_dir)\n",
|
| 197 |
" _remove_dir(webui_path)\n",
|
| 198 |
" os.environ['SDW_OLD_UI'] = UI\n",
|
|
|
|
| 138 |
" 'models/ControlNet'\n",
|
| 139 |
" ]\n",
|
| 140 |
"\n",
|
| 141 |
+
" print(\"⌚ Moving files...\", end='')\n",
|
| 142 |
" time.sleep(1)\n",
|
| 143 |
" for item in items_to_copy:\n",
|
| 144 |
" src = os.path.join(src_base, item)\n",
|
|
|
|
| 151 |
" shutil.move(src, dst)\n",
|
| 152 |
" print(\"\\r🔥 Files moved!\" + \" \"*15)\n",
|
| 153 |
"\n",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
"def handle_colab_timer(webui_path, timer_colab):\n",
|
| 155 |
" timer_file_path = os.path.join(webui_path, 'static', 'colabTimer.txt')\n",
|
| 156 |
" if not os.path.exists(timer_file_path):\n",
|
|
|
|
| 170 |
" if UI == 'Forge':\n",
|
| 171 |
" download_url = \"https://huggingface.co/NagisaNao/fast_repo/resolve/main/FULL_REPO_forge.zip\"\n",
|
| 172 |
"\n",
|
| 173 |
+
" aria2_args = \"--console-log-level=error -c -x 16 -s 16 -k 1M\"\n",
|
| 174 |
+
" zip_path = f\"{root_path}/repo.zip\"\n",
|
| 175 |
+
" !aria2c {aria2_args} {download_url} -d {root_path} -o repo.zip\n",
|
| 176 |
+
" !unzip -q -o {zip_path} -d {webui_path}\n",
|
| 177 |
+
" !rm -rf {zip_path}\n",
|
| 178 |
"\n",
|
| 179 |
" get_ipython().system(f'echo -n {start_colab} > {webui_path}/static/colabTimer.txt')\n",
|
| 180 |
" del cap\n",
|
|
|
|
| 190 |
"# ================= MAIN CODE ==================\n",
|
| 191 |
"if os.path.exists(webui_path):\n",
|
| 192 |
" if UI != OLD_UI:\n",
|
| 193 |
+
" print(f'Switching the WebUI from \\033[33m{OLD_UI}\\033[0m to \\033[33m{UI}\\033[0m:')\n",
|
| 194 |
" copy_items_with_replace(webui_path, temporarily_dir)\n",
|
| 195 |
" _remove_dir(webui_path)\n",
|
| 196 |
" os.environ['SDW_OLD_UI'] = UI\n",
|
files_cells/notebooks/en/launch_en.ipynb
CHANGED
|
@@ -134,8 +134,10 @@
|
|
| 134 |
" if env != \"Google Colab\":\n",
|
| 135 |
" commandline_arguments += f' --encrypt-pass={tunnel_port} --api'\n",
|
| 136 |
"\n",
|
| 137 |
-
" if change_webui == '
|
| 138 |
-
" commandline_arguments += ' --
|
|
|
|
|
|
|
| 139 |
"\n",
|
| 140 |
" !COMMANDLINE_ARGS=\"{commandline_arguments}\" python launch.py\n",
|
| 141 |
"\n",
|
|
|
|
| 134 |
" if env != \"Google Colab\":\n",
|
| 135 |
" commandline_arguments += f' --encrypt-pass={tunnel_port} --api'\n",
|
| 136 |
"\n",
|
| 137 |
+
" if change_webui == 'A1111':\n",
|
| 138 |
+
" commandline_arguments += ' --xformers'\n",
|
| 139 |
+
" else:\n",
|
| 140 |
+
" commandline_arguments += ' --disable-xformers --opt-sdp-attention --cuda-stream --pin-shared-memory'\n",
|
| 141 |
"\n",
|
| 142 |
" !COMMANDLINE_ARGS=\"{commandline_arguments}\" python launch.py\n",
|
| 143 |
"\n",
|
files_cells/notebooks/en/widgets_en.ipynb
CHANGED
|
@@ -228,7 +228,7 @@
|
|
| 228 |
"zrok_button = factory.create_html('<a href=\"https://colab.research.google.com/drive/1d2sjWDJi_GYBUavrHSuQyHTDuLy36WpU\" target=\"_blank\">Зарегать Zrok Токен</a>', class_name=\"button_ngrok\")\n",
|
| 229 |
"zrok_widget = factory.create_hbox([zrok_token_widget, zrok_button])\n",
|
| 230 |
"\n",
|
| 231 |
-
"commandline_arguments_options = \"--listen --enable-insecure-extension-access --theme dark --no-half-vae --disable-console-progressbars
|
| 232 |
"commandline_arguments_widget = factory.create_text('Arguments:', value=commandline_arguments_options)\n",
|
| 233 |
"\n",
|
| 234 |
"# Display Additional\n",
|
|
|
|
| 228 |
"zrok_button = factory.create_html('<a href=\"https://colab.research.google.com/drive/1d2sjWDJi_GYBUavrHSuQyHTDuLy36WpU\" target=\"_blank\">Зарегать Zrok Токен</a>', class_name=\"button_ngrok\")\n",
|
| 229 |
"zrok_widget = factory.create_hbox([zrok_token_widget, zrok_button])\n",
|
| 230 |
"\n",
|
| 231 |
+
"commandline_arguments_options = \"--listen --enable-insecure-extension-access --theme dark --no-half-vae --disable-console-progressbars\"\n",
|
| 232 |
"commandline_arguments_widget = factory.create_text('Arguments:', value=commandline_arguments_options)\n",
|
| 233 |
"\n",
|
| 234 |
"# Display Additional\n",
|
files_cells/notebooks/ru/downloading_ru.ipynb
CHANGED
|
@@ -138,7 +138,7 @@
|
|
| 138 |
" 'models/ControlNet'\n",
|
| 139 |
" ]\n",
|
| 140 |
"\n",
|
| 141 |
-
" print(\"Перемещение файлов...\", end='')\n",
|
| 142 |
" time.sleep(1)\n",
|
| 143 |
" for item in items_to_copy:\n",
|
| 144 |
" src = os.path.join(src_base, item)\n",
|
|
@@ -151,12 +151,6 @@
|
|
| 151 |
" shutil.move(src, dst)\n",
|
| 152 |
" print(\"\\r🔥 Файлы перемещены!\" + \" \"*15)\n",
|
| 153 |
"\n",
|
| 154 |
-
"def download_and_unpack(url, dest_path):\n",
|
| 155 |
-
" aria2_args = \"--console-log-level=error -c -x 16 -s 16 -k 1M\"\n",
|
| 156 |
-
" !aria2c {aria2_args} '{url}' -o repo.zip\n",
|
| 157 |
-
" !unzip -q -o repo.zip -d {dest_path}\n",
|
| 158 |
-
" !rm -rf repo.zip\n",
|
| 159 |
-
"\n",
|
| 160 |
"def handle_colab_timer(webui_path, timer_colab):\n",
|
| 161 |
" timer_file_path = os.path.join(webui_path, 'static', 'colabTimer.txt')\n",
|
| 162 |
" if not os.path.exists(timer_file_path):\n",
|
|
@@ -176,7 +170,11 @@
|
|
| 176 |
" if UI == 'Forge':\n",
|
| 177 |
" download_url = \"https://huggingface.co/NagisaNao/fast_repo/resolve/main/FULL_REPO_forge.zip\"\n",
|
| 178 |
"\n",
|
| 179 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 180 |
"\n",
|
| 181 |
" get_ipython().system(f'echo -n {start_colab} > {webui_path}/static/colabTimer.txt')\n",
|
| 182 |
" del cap\n",
|
|
@@ -192,7 +190,7 @@
|
|
| 192 |
"# ================= MAIN CODE ==================\n",
|
| 193 |
"if os.path.exists(webui_path):\n",
|
| 194 |
" if UI != OLD_UI:\n",
|
| 195 |
-
" print(f'Переключение веб-интерфейса с \\033[33m{OLD_UI}\\033[0m на \\033[33m{UI}\\033[0m
|
| 196 |
" copy_items_with_replace(webui_path, temporarily_dir)\n",
|
| 197 |
" _remove_dir(webui_path)\n",
|
| 198 |
" os.environ['SDW_OLD_UI'] = UI\n",
|
|
|
|
| 138 |
" 'models/ControlNet'\n",
|
| 139 |
" ]\n",
|
| 140 |
"\n",
|
| 141 |
+
" print(\"⌚ Перемещение файлов...\", end='')\n",
|
| 142 |
" time.sleep(1)\n",
|
| 143 |
" for item in items_to_copy:\n",
|
| 144 |
" src = os.path.join(src_base, item)\n",
|
|
|
|
| 151 |
" shutil.move(src, dst)\n",
|
| 152 |
" print(\"\\r🔥 Файлы перемещены!\" + \" \"*15)\n",
|
| 153 |
"\n",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
"def handle_colab_timer(webui_path, timer_colab):\n",
|
| 155 |
" timer_file_path = os.path.join(webui_path, 'static', 'colabTimer.txt')\n",
|
| 156 |
" if not os.path.exists(timer_file_path):\n",
|
|
|
|
| 170 |
" if UI == 'Forge':\n",
|
| 171 |
" download_url = \"https://huggingface.co/NagisaNao/fast_repo/resolve/main/FULL_REPO_forge.zip\"\n",
|
| 172 |
"\n",
|
| 173 |
+
" aria2_args = \"--console-log-level=error -c -x 16 -s 16 -k 1M\"\n",
|
| 174 |
+
" zip_path = f\"{root_path}/repo.zip\"\n",
|
| 175 |
+
" !aria2c {aria2_args} {download_url} -d {root_path} -o repo.zip\n",
|
| 176 |
+
" !unzip -q -o {zip_path} -d {webui_path}\n",
|
| 177 |
+
" !rm -rf {zip_path}\n",
|
| 178 |
"\n",
|
| 179 |
" get_ipython().system(f'echo -n {start_colab} > {webui_path}/static/colabTimer.txt')\n",
|
| 180 |
" del cap\n",
|
|
|
|
| 190 |
"# ================= MAIN CODE ==================\n",
|
| 191 |
"if os.path.exists(webui_path):\n",
|
| 192 |
" if UI != OLD_UI:\n",
|
| 193 |
+
" print(f'Переключение веб-интерфейса с \\033[33m{OLD_UI}\\033[0m на \\033[33m{UI}\\033[0m:')\n",
|
| 194 |
" copy_items_with_replace(webui_path, temporarily_dir)\n",
|
| 195 |
" _remove_dir(webui_path)\n",
|
| 196 |
" os.environ['SDW_OLD_UI'] = UI\n",
|
files_cells/notebooks/ru/launch_ru.ipynb
CHANGED
|
@@ -134,8 +134,10 @@
|
|
| 134 |
" if env != \"Google Colab\":\n",
|
| 135 |
" commandline_arguments += f' --encrypt-pass={tunnel_port} --api'\n",
|
| 136 |
"\n",
|
| 137 |
-
" if change_webui == '
|
| 138 |
-
" commandline_arguments += ' --
|
|
|
|
|
|
|
| 139 |
"\n",
|
| 140 |
" !COMMANDLINE_ARGS=\"{commandline_arguments}\" python launch.py\n",
|
| 141 |
"\n",
|
|
|
|
| 134 |
" if env != \"Google Colab\":\n",
|
| 135 |
" commandline_arguments += f' --encrypt-pass={tunnel_port} --api'\n",
|
| 136 |
"\n",
|
| 137 |
+
" if change_webui == 'A1111':\n",
|
| 138 |
+
" commandline_arguments += ' --xformers'\n",
|
| 139 |
+
" else:\n",
|
| 140 |
+
" commandline_arguments += ' --disable-xformers --opt-sdp-attention --cuda-stream --pin-shared-memory'\n",
|
| 141 |
"\n",
|
| 142 |
" !COMMANDLINE_ARGS=\"{commandline_arguments}\" python launch.py\n",
|
| 143 |
"\n",
|
files_cells/notebooks/ru/widgets_ru.ipynb
CHANGED
|
@@ -228,7 +228,7 @@
|
|
| 228 |
"zrok_button = factory.create_html('<a href=\"https://colab.research.google.com/drive/1d2sjWDJi_GYBUavrHSuQyHTDuLy36WpU\" target=\"_blank\">Зарегать Zrok Токен</a>', class_name=\"button_ngrok\")\n",
|
| 229 |
"zrok_widget = factory.create_hbox([zrok_token_widget, zrok_button])\n",
|
| 230 |
"\n",
|
| 231 |
-
"commandline_arguments_options = \"--listen --enable-insecure-extension-access --theme dark --no-half-vae --disable-console-progressbars
|
| 232 |
"commandline_arguments_widget = factory.create_text('Аргументы:', value=commandline_arguments_options)\n",
|
| 233 |
"\n",
|
| 234 |
"# Display Additional\n",
|
|
|
|
| 228 |
"zrok_button = factory.create_html('<a href=\"https://colab.research.google.com/drive/1d2sjWDJi_GYBUavrHSuQyHTDuLy36WpU\" target=\"_blank\">Зарегать Zrok Токен</a>', class_name=\"button_ngrok\")\n",
|
| 229 |
"zrok_widget = factory.create_hbox([zrok_token_widget, zrok_button])\n",
|
| 230 |
"\n",
|
| 231 |
+
"commandline_arguments_options = \"--listen --enable-insecure-extension-access --theme dark --no-half-vae --disable-console-progressbars\"\n",
|
| 232 |
"commandline_arguments_widget = factory.create_text('Аргументы:', value=commandline_arguments_options)\n",
|
| 233 |
"\n",
|
| 234 |
"# Display Additional\n",
|
files_cells/python/en/downloading_en.py
CHANGED
|
@@ -128,7 +128,7 @@ def copy_items_with_replace(src_base, dst_base):
|
|
| 128 |
'models/ControlNet'
|
| 129 |
]
|
| 130 |
|
| 131 |
-
print("Moving files...", end='')
|
| 132 |
time.sleep(1)
|
| 133 |
for item in items_to_copy:
|
| 134 |
src = os.path.join(src_base, item)
|
|
@@ -141,12 +141,6 @@ def copy_items_with_replace(src_base, dst_base):
|
|
| 141 |
shutil.move(src, dst)
|
| 142 |
print("\r🔥 Files moved!" + " "*15)
|
| 143 |
|
| 144 |
-
def download_and_unpack(url, dest_path):
|
| 145 |
-
aria2_args = "--console-log-level=error -c -x 16 -s 16 -k 1M"
|
| 146 |
-
get_ipython().system("aria2c {aria2_args} '{url}' -o repo.zip")
|
| 147 |
-
get_ipython().system('unzip -q -o repo.zip -d {dest_path}')
|
| 148 |
-
get_ipython().system('rm -rf repo.zip')
|
| 149 |
-
|
| 150 |
def handle_colab_timer(webui_path, timer_colab):
|
| 151 |
timer_file_path = os.path.join(webui_path, 'static', 'colabTimer.txt')
|
| 152 |
if not os.path.exists(timer_file_path):
|
|
@@ -166,7 +160,11 @@ def unpack_webui():
|
|
| 166 |
if UI == 'Forge':
|
| 167 |
download_url = "https://huggingface.co/NagisaNao/fast_repo/resolve/main/FULL_REPO_forge.zip"
|
| 168 |
|
| 169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
|
| 171 |
get_ipython().system(f'echo -n {start_colab} > {webui_path}/static/colabTimer.txt')
|
| 172 |
del cap
|
|
@@ -182,7 +180,7 @@ def unpack_webui():
|
|
| 182 |
# ================= MAIN CODE ==================
|
| 183 |
if os.path.exists(webui_path):
|
| 184 |
if UI != OLD_UI:
|
| 185 |
-
print(f'Switching the WebUI from \033[33m{OLD_UI}\033[0m to \033[33m{UI}\033[0m
|
| 186 |
copy_items_with_replace(webui_path, temporarily_dir)
|
| 187 |
_remove_dir(webui_path)
|
| 188 |
os.environ['SDW_OLD_UI'] = UI
|
|
|
|
| 128 |
'models/ControlNet'
|
| 129 |
]
|
| 130 |
|
| 131 |
+
print("⌚ Moving files...", end='')
|
| 132 |
time.sleep(1)
|
| 133 |
for item in items_to_copy:
|
| 134 |
src = os.path.join(src_base, item)
|
|
|
|
| 141 |
shutil.move(src, dst)
|
| 142 |
print("\r🔥 Files moved!" + " "*15)
|
| 143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
def handle_colab_timer(webui_path, timer_colab):
|
| 145 |
timer_file_path = os.path.join(webui_path, 'static', 'colabTimer.txt')
|
| 146 |
if not os.path.exists(timer_file_path):
|
|
|
|
| 160 |
if UI == 'Forge':
|
| 161 |
download_url = "https://huggingface.co/NagisaNao/fast_repo/resolve/main/FULL_REPO_forge.zip"
|
| 162 |
|
| 163 |
+
aria2_args = "--console-log-level=error -c -x 16 -s 16 -k 1M"
|
| 164 |
+
zip_path = f"{root_path}/repo.zip"
|
| 165 |
+
get_ipython().system('aria2c {aria2_args} {download_url} -d {root_path} -o repo.zip')
|
| 166 |
+
get_ipython().system('unzip -q -o {zip_path} -d {webui_path}')
|
| 167 |
+
get_ipython().system('rm -rf {zip_path}')
|
| 168 |
|
| 169 |
get_ipython().system(f'echo -n {start_colab} > {webui_path}/static/colabTimer.txt')
|
| 170 |
del cap
|
|
|
|
| 180 |
# ================= MAIN CODE ==================
|
| 181 |
if os.path.exists(webui_path):
|
| 182 |
if UI != OLD_UI:
|
| 183 |
+
print(f'Switching the WebUI from \033[33m{OLD_UI}\033[0m to \033[33m{UI}\033[0m:')
|
| 184 |
copy_items_with_replace(webui_path, temporarily_dir)
|
| 185 |
_remove_dir(webui_path)
|
| 186 |
os.environ['SDW_OLD_UI'] = UI
|
files_cells/python/en/launch_en.py
CHANGED
|
@@ -110,8 +110,10 @@ with tunnel:
|
|
| 110 |
if env != "Google Colab":
|
| 111 |
commandline_arguments += f' --encrypt-pass={tunnel_port} --api'
|
| 112 |
|
| 113 |
-
if change_webui == '
|
| 114 |
-
commandline_arguments += ' --
|
|
|
|
|
|
|
| 115 |
|
| 116 |
get_ipython().system('COMMANDLINE_ARGS="{commandline_arguments}" python launch.py')
|
| 117 |
|
|
|
|
| 110 |
if env != "Google Colab":
|
| 111 |
commandline_arguments += f' --encrypt-pass={tunnel_port} --api'
|
| 112 |
|
| 113 |
+
if change_webui == 'A1111':
|
| 114 |
+
commandline_arguments += ' --xformers'
|
| 115 |
+
else:
|
| 116 |
+
commandline_arguments += ' --disable-xformers --opt-sdp-attention --cuda-stream --pin-shared-memory'
|
| 117 |
|
| 118 |
get_ipython().system('COMMANDLINE_ARGS="{commandline_arguments}" python launch.py')
|
| 119 |
|
files_cells/python/en/widgets_en.py
CHANGED
|
@@ -204,7 +204,7 @@ zrok_token_widget = factory.create_text('Zrok Token:')
|
|
| 204 |
zrok_button = factory.create_html('<a href="https://colab.research.google.com/drive/1d2sjWDJi_GYBUavrHSuQyHTDuLy36WpU" target="_blank">Зарегать Zrok Токен</a>', class_name="button_ngrok")
|
| 205 |
zrok_widget = factory.create_hbox([zrok_token_widget, zrok_button])
|
| 206 |
|
| 207 |
-
commandline_arguments_options = "--listen --enable-insecure-extension-access --theme dark --no-half-vae --disable-console-progressbars
|
| 208 |
commandline_arguments_widget = factory.create_text('Arguments:', value=commandline_arguments_options)
|
| 209 |
|
| 210 |
# Display Additional
|
|
|
|
| 204 |
zrok_button = factory.create_html('<a href="https://colab.research.google.com/drive/1d2sjWDJi_GYBUavrHSuQyHTDuLy36WpU" target="_blank">Зарегать Zrok Токен</a>', class_name="button_ngrok")
|
| 205 |
zrok_widget = factory.create_hbox([zrok_token_widget, zrok_button])
|
| 206 |
|
| 207 |
+
commandline_arguments_options = "--listen --enable-insecure-extension-access --theme dark --no-half-vae --disable-console-progressbars"
|
| 208 |
commandline_arguments_widget = factory.create_text('Arguments:', value=commandline_arguments_options)
|
| 209 |
|
| 210 |
# Display Additional
|
files_cells/python/ru/downloading_ru.py
CHANGED
|
@@ -128,7 +128,7 @@ def copy_items_with_replace(src_base, dst_base):
|
|
| 128 |
'models/ControlNet'
|
| 129 |
]
|
| 130 |
|
| 131 |
-
print("Перемещение файлов...", end='')
|
| 132 |
time.sleep(1)
|
| 133 |
for item in items_to_copy:
|
| 134 |
src = os.path.join(src_base, item)
|
|
@@ -141,12 +141,6 @@ def copy_items_with_replace(src_base, dst_base):
|
|
| 141 |
shutil.move(src, dst)
|
| 142 |
print("\r🔥 Файлы перемещены!" + " "*15)
|
| 143 |
|
| 144 |
-
def download_and_unpack(url, dest_path):
|
| 145 |
-
aria2_args = "--console-log-level=error -c -x 16 -s 16 -k 1M"
|
| 146 |
-
get_ipython().system("aria2c {aria2_args} '{url}' -o repo.zip")
|
| 147 |
-
get_ipython().system('unzip -q -o repo.zip -d {dest_path}')
|
| 148 |
-
get_ipython().system('rm -rf repo.zip')
|
| 149 |
-
|
| 150 |
def handle_colab_timer(webui_path, timer_colab):
|
| 151 |
timer_file_path = os.path.join(webui_path, 'static', 'colabTimer.txt')
|
| 152 |
if not os.path.exists(timer_file_path):
|
|
@@ -166,7 +160,11 @@ def unpack_webui():
|
|
| 166 |
if UI == 'Forge':
|
| 167 |
download_url = "https://huggingface.co/NagisaNao/fast_repo/resolve/main/FULL_REPO_forge.zip"
|
| 168 |
|
| 169 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
|
| 171 |
get_ipython().system(f'echo -n {start_colab} > {webui_path}/static/colabTimer.txt')
|
| 172 |
del cap
|
|
@@ -182,7 +180,7 @@ def unpack_webui():
|
|
| 182 |
# ================= MAIN CODE ==================
|
| 183 |
if os.path.exists(webui_path):
|
| 184 |
if UI != OLD_UI:
|
| 185 |
-
print(f'Переключение веб-интерфейса с \033[33m{OLD_UI}\033[0m на \033[33m{UI}\033[0m
|
| 186 |
copy_items_with_replace(webui_path, temporarily_dir)
|
| 187 |
_remove_dir(webui_path)
|
| 188 |
os.environ['SDW_OLD_UI'] = UI
|
|
|
|
| 128 |
'models/ControlNet'
|
| 129 |
]
|
| 130 |
|
| 131 |
+
print("⌚ Перемещение файлов...", end='')
|
| 132 |
time.sleep(1)
|
| 133 |
for item in items_to_copy:
|
| 134 |
src = os.path.join(src_base, item)
|
|
|
|
| 141 |
shutil.move(src, dst)
|
| 142 |
print("\r🔥 Файлы перемещены!" + " "*15)
|
| 143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
def handle_colab_timer(webui_path, timer_colab):
|
| 145 |
timer_file_path = os.path.join(webui_path, 'static', 'colabTimer.txt')
|
| 146 |
if not os.path.exists(timer_file_path):
|
|
|
|
| 160 |
if UI == 'Forge':
|
| 161 |
download_url = "https://huggingface.co/NagisaNao/fast_repo/resolve/main/FULL_REPO_forge.zip"
|
| 162 |
|
| 163 |
+
aria2_args = "--console-log-level=error -c -x 16 -s 16 -k 1M"
|
| 164 |
+
zip_path = f"{root_path}/repo.zip"
|
| 165 |
+
get_ipython().system('aria2c {aria2_args} {download_url} -d {root_path} -o repo.zip')
|
| 166 |
+
get_ipython().system('unzip -q -o {zip_path} -d {webui_path}')
|
| 167 |
+
get_ipython().system('rm -rf {zip_path}')
|
| 168 |
|
| 169 |
get_ipython().system(f'echo -n {start_colab} > {webui_path}/static/colabTimer.txt')
|
| 170 |
del cap
|
|
|
|
| 180 |
# ================= MAIN CODE ==================
|
| 181 |
if os.path.exists(webui_path):
|
| 182 |
if UI != OLD_UI:
|
| 183 |
+
print(f'Переключение веб-интерфейса с \033[33m{OLD_UI}\033[0m на \033[33m{UI}\033[0m:')
|
| 184 |
copy_items_with_replace(webui_path, temporarily_dir)
|
| 185 |
_remove_dir(webui_path)
|
| 186 |
os.environ['SDW_OLD_UI'] = UI
|
files_cells/python/ru/launch_ru.py
CHANGED
|
@@ -110,8 +110,10 @@ with tunnel:
|
|
| 110 |
if env != "Google Colab":
|
| 111 |
commandline_arguments += f' --encrypt-pass={tunnel_port} --api'
|
| 112 |
|
| 113 |
-
if change_webui == '
|
| 114 |
-
commandline_arguments += ' --
|
|
|
|
|
|
|
| 115 |
|
| 116 |
get_ipython().system('COMMANDLINE_ARGS="{commandline_arguments}" python launch.py')
|
| 117 |
|
|
|
|
| 110 |
if env != "Google Colab":
|
| 111 |
commandline_arguments += f' --encrypt-pass={tunnel_port} --api'
|
| 112 |
|
| 113 |
+
if change_webui == 'A1111':
|
| 114 |
+
commandline_arguments += ' --xformers'
|
| 115 |
+
else:
|
| 116 |
+
commandline_arguments += ' --disable-xformers --opt-sdp-attention --cuda-stream --pin-shared-memory'
|
| 117 |
|
| 118 |
get_ipython().system('COMMANDLINE_ARGS="{commandline_arguments}" python launch.py')
|
| 119 |
|
files_cells/python/ru/widgets_ru.py
CHANGED
|
@@ -204,7 +204,7 @@ zrok_token_widget = factory.create_text('Токен Zrok:')
|
|
| 204 |
zrok_button = factory.create_html('<a href="https://colab.research.google.com/drive/1d2sjWDJi_GYBUavrHSuQyHTDuLy36WpU" target="_blank">Зарегать Zrok Токен</a>', class_name="button_ngrok")
|
| 205 |
zrok_widget = factory.create_hbox([zrok_token_widget, zrok_button])
|
| 206 |
|
| 207 |
-
commandline_arguments_options = "--listen --enable-insecure-extension-access --theme dark --no-half-vae --disable-console-progressbars
|
| 208 |
commandline_arguments_widget = factory.create_text('Аргументы:', value=commandline_arguments_options)
|
| 209 |
|
| 210 |
# Display Additional
|
|
|
|
| 204 |
zrok_button = factory.create_html('<a href="https://colab.research.google.com/drive/1d2sjWDJi_GYBUavrHSuQyHTDuLy36WpU" target="_blank">Зарегать Zrok Токен</a>', class_name="button_ngrok")
|
| 205 |
zrok_widget = factory.create_hbox([zrok_token_widget, zrok_button])
|
| 206 |
|
| 207 |
+
commandline_arguments_options = "--listen --enable-insecure-extension-access --theme dark --no-half-vae --disable-console-progressbars"
|
| 208 |
commandline_arguments_widget = factory.create_text('Аргументы:', value=commandline_arguments_options)
|
| 209 |
|
| 210 |
# Display Additional
|