files_cells/notebooks/en/downloading_en.ipynb
CHANGED
@@ -50,6 +50,16 @@
|
|
50 |
"# ----------------------------------------------\n",
|
51 |
"\n",
|
52 |
"\n",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
"# ================ LIBRARIES ================\n",
|
54 |
"flag_file = f\"{root_path}/libraries_installed.txt\"\n",
|
55 |
"\n",
|
@@ -65,6 +75,11 @@
|
|
65 |
" !curl -s -Lo /usr/bin/cl https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 && chmod +x /usr/bin/cl\n",
|
66 |
" !pip install insightface\n",
|
67 |
"\n",
|
|
|
|
|
|
|
|
|
|
|
68 |
" if env == \"Google Colab\":\n",
|
69 |
" !pip install -q xformers==0.0.22.post7\n",
|
70 |
" else:\n",
|
@@ -158,9 +173,14 @@
|
|
158 |
"\n",
|
159 |
" ## Update extensions\n",
|
160 |
" if latest_exstensions:\n",
|
161 |
-
"
|
162 |
-
"
|
163 |
-
"
|
|
|
|
|
|
|
|
|
|
|
164 |
"\n",
|
165 |
" !cd {webui_path}/repositories/stable-diffusion-stability-ai && git restore .\n",
|
166 |
" del cap\n",
|
|
|
50 |
"# ----------------------------------------------\n",
|
51 |
"\n",
|
52 |
"\n",
|
53 |
+
"# == ONLY SAGEMAKER ===\n",
|
54 |
+
"if env == \"SageMaker Studio Lab\":\n",
|
55 |
+
" print(\"Обновление зависимостей, может занять некоторое время...\")\n",
|
56 |
+
" !pip install -q --upgrade torchsde\n",
|
57 |
+
" !pip install -q --upgrade pip\n",
|
58 |
+
" !pip install -q --upgrade psutil\n",
|
59 |
+
"\n",
|
60 |
+
" clear_output()\n",
|
61 |
+
"\n",
|
62 |
+
"\n",
|
63 |
"# ================ LIBRARIES ================\n",
|
64 |
"flag_file = f\"{root_path}/libraries_installed.txt\"\n",
|
65 |
"\n",
|
|
|
75 |
" !curl -s -Lo /usr/bin/cl https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 && chmod +x /usr/bin/cl\n",
|
76 |
" !pip install insightface\n",
|
77 |
"\n",
|
78 |
+
" if env == \"SageMaker Studio Lab\":\n",
|
79 |
+
" %pip install -q opencv-python-headless huggingface-hub\n",
|
80 |
+
" %conda update -q -n base conda\n",
|
81 |
+
" %conda install -q -y glib\n",
|
82 |
+
"\n",
|
83 |
" if env == \"Google Colab\":\n",
|
84 |
" !pip install -q xformers==0.0.22.post7\n",
|
85 |
" else:\n",
|
|
|
173 |
"\n",
|
174 |
" ## Update extensions\n",
|
175 |
" if latest_exstensions:\n",
|
176 |
+
" extensions_path = f\"{webui_path}/extensions/\"\n",
|
177 |
+
"\n",
|
178 |
+
" for dir_name in os.listdir(extensions_path):\n",
|
179 |
+
" repo_path = os.path.join(extensions_path, dir_name)\n",
|
180 |
+
" if os.path.isdir(repo_path):\n",
|
181 |
+
" %cd {repo_path}\n",
|
182 |
+
" !git reset --hard\n",
|
183 |
+
" !git pull\n",
|
184 |
"\n",
|
185 |
" !cd {webui_path}/repositories/stable-diffusion-stability-ai && git restore .\n",
|
186 |
" del cap\n",
|
files_cells/notebooks/ru/downloading_ru.ipynb
CHANGED
@@ -65,6 +65,11 @@
|
|
65 |
" !curl -s -Lo /usr/bin/cl https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 && chmod +x /usr/bin/cl\n",
|
66 |
" !pip install insightface\n",
|
67 |
"\n",
|
|
|
|
|
|
|
|
|
|
|
68 |
" if env == \"Google Colab\":\n",
|
69 |
" !pip install -q xformers==0.0.22.post7\n",
|
70 |
" else:\n",
|
@@ -158,9 +163,14 @@
|
|
158 |
"\n",
|
159 |
" ## Update extensions\n",
|
160 |
" if latest_exstensions:\n",
|
161 |
-
"
|
162 |
-
"
|
163 |
-
"
|
|
|
|
|
|
|
|
|
|
|
164 |
"\n",
|
165 |
" !cd {webui_path}/repositories/stable-diffusion-stability-ai && git restore .\n",
|
166 |
" del cap\n",
|
|
|
65 |
" !curl -s -Lo /usr/bin/cl https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 && chmod +x /usr/bin/cl\n",
|
66 |
" !pip install insightface\n",
|
67 |
"\n",
|
68 |
+
" if env == \"SageMaker Studio Lab\":\n",
|
69 |
+
" %pip install -q opencv-python-headless huggingface-hub\n",
|
70 |
+
" %conda update -q -n base conda\n",
|
71 |
+
" %conda install -q -y glib\n",
|
72 |
+
"\n",
|
73 |
" if env == \"Google Colab\":\n",
|
74 |
" !pip install -q xformers==0.0.22.post7\n",
|
75 |
" else:\n",
|
|
|
163 |
"\n",
|
164 |
" ## Update extensions\n",
|
165 |
" if latest_exstensions:\n",
|
166 |
+
" extensions_path = f\"{webui_path}/extensions/\"\n",
|
167 |
+
"\n",
|
168 |
+
" for dir_name in os.listdir(extensions_path):\n",
|
169 |
+
" repo_path = os.path.join(extensions_path, dir_name)\n",
|
170 |
+
" if os.path.isdir(repo_path):\n",
|
171 |
+
" %cd {repo_path}\n",
|
172 |
+
" !git reset --hard\n",
|
173 |
+
" !git pull\n",
|
174 |
"\n",
|
175 |
" !cd {webui_path}/repositories/stable-diffusion-stability-ai && git restore .\n",
|
176 |
" del cap\n",
|
files_cells/python/en/downloading_en.py
CHANGED
@@ -37,6 +37,16 @@ webui_path = f"{root_path}/sdw"
|
|
37 |
# ----------------------------------------------
|
38 |
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
# ================ LIBRARIES ================
|
41 |
flag_file = f"{root_path}/libraries_installed.txt"
|
42 |
|
@@ -52,6 +62,11 @@ if not os.path.exists(flag_file):
|
|
52 |
get_ipython().system('curl -s -Lo /usr/bin/cl https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 && chmod +x /usr/bin/cl')
|
53 |
get_ipython().system('pip install insightface')
|
54 |
|
|
|
|
|
|
|
|
|
|
|
55 |
if env == "Google Colab":
|
56 |
get_ipython().system('pip install -q xformers==0.0.22.post7')
|
57 |
else:
|
@@ -145,9 +160,14 @@ if latest_webui or latest_exstensions:
|
|
145 |
|
146 |
## Update extensions
|
147 |
if latest_exstensions:
|
148 |
-
|
149 |
-
|
150 |
-
|
|
|
|
|
|
|
|
|
|
|
151 |
|
152 |
get_ipython().system('cd {webui_path}/repositories/stable-diffusion-stability-ai && git restore .')
|
153 |
del cap
|
|
|
37 |
# ----------------------------------------------
|
38 |
|
39 |
|
40 |
+
# == ONLY SAGEMAKER ===
|
41 |
+
if env == "SageMaker Studio Lab":
|
42 |
+
print("Обновление зависимостей, может занять некоторое время...")
|
43 |
+
get_ipython().system('pip install -q --upgrade torchsde')
|
44 |
+
get_ipython().system('pip install -q --upgrade pip')
|
45 |
+
get_ipython().system('pip install -q --upgrade psutil')
|
46 |
+
|
47 |
+
clear_output()
|
48 |
+
|
49 |
+
|
50 |
# ================ LIBRARIES ================
|
51 |
flag_file = f"{root_path}/libraries_installed.txt"
|
52 |
|
|
|
62 |
get_ipython().system('curl -s -Lo /usr/bin/cl https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 && chmod +x /usr/bin/cl')
|
63 |
get_ipython().system('pip install insightface')
|
64 |
|
65 |
+
if env == "SageMaker Studio Lab":
|
66 |
+
get_ipython().run_line_magic('pip', 'install -q opencv-python-headless huggingface-hub')
|
67 |
+
get_ipython().run_line_magic('conda', 'update -q -n base conda')
|
68 |
+
get_ipython().run_line_magic('conda', 'install -q -y glib')
|
69 |
+
|
70 |
if env == "Google Colab":
|
71 |
get_ipython().system('pip install -q xformers==0.0.22.post7')
|
72 |
else:
|
|
|
160 |
|
161 |
## Update extensions
|
162 |
if latest_exstensions:
|
163 |
+
extensions_path = f"{webui_path}/extensions/"
|
164 |
+
|
165 |
+
for dir_name in os.listdir(extensions_path):
|
166 |
+
repo_path = os.path.join(extensions_path, dir_name)
|
167 |
+
if os.path.isdir(repo_path):
|
168 |
+
get_ipython().run_line_magic('cd', '{repo_path}')
|
169 |
+
get_ipython().system('git reset --hard')
|
170 |
+
get_ipython().system('git pull')
|
171 |
|
172 |
get_ipython().system('cd {webui_path}/repositories/stable-diffusion-stability-ai && git restore .')
|
173 |
del cap
|
files_cells/python/ru/downloading_ru.py
CHANGED
@@ -52,6 +52,11 @@ if not os.path.exists(flag_file):
|
|
52 |
get_ipython().system('curl -s -Lo /usr/bin/cl https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 && chmod +x /usr/bin/cl')
|
53 |
get_ipython().system('pip install insightface')
|
54 |
|
|
|
|
|
|
|
|
|
|
|
55 |
if env == "Google Colab":
|
56 |
get_ipython().system('pip install -q xformers==0.0.22.post7')
|
57 |
else:
|
@@ -145,9 +150,14 @@ if latest_webui or latest_exstensions:
|
|
145 |
|
146 |
## Update extensions
|
147 |
if latest_exstensions:
|
148 |
-
|
149 |
-
|
150 |
-
|
|
|
|
|
|
|
|
|
|
|
151 |
|
152 |
get_ipython().system('cd {webui_path}/repositories/stable-diffusion-stability-ai && git restore .')
|
153 |
del cap
|
|
|
52 |
get_ipython().system('curl -s -Lo /usr/bin/cl https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 && chmod +x /usr/bin/cl')
|
53 |
get_ipython().system('pip install insightface')
|
54 |
|
55 |
+
if env == "SageMaker Studio Lab":
|
56 |
+
get_ipython().run_line_magic('pip', 'install -q opencv-python-headless huggingface-hub')
|
57 |
+
get_ipython().run_line_magic('conda', 'update -q -n base conda')
|
58 |
+
get_ipython().run_line_magic('conda', 'install -q -y glib')
|
59 |
+
|
60 |
if env == "Google Colab":
|
61 |
get_ipython().system('pip install -q xformers==0.0.22.post7')
|
62 |
else:
|
|
|
150 |
|
151 |
## Update extensions
|
152 |
if latest_exstensions:
|
153 |
+
extensions_path = f"{webui_path}/extensions/"
|
154 |
+
|
155 |
+
for dir_name in os.listdir(extensions_path):
|
156 |
+
repo_path = os.path.join(extensions_path, dir_name)
|
157 |
+
if os.path.isdir(repo_path):
|
158 |
+
get_ipython().run_line_magic('cd', '{repo_path}')
|
159 |
+
get_ipython().system('git reset --hard')
|
160 |
+
get_ipython().system('git pull')
|
161 |
|
162 |
get_ipython().system('cd {webui_path}/repositories/stable-diffusion-stability-ai && git restore .')
|
163 |
del cap
|