NagisaNao commited on
Commit
14c3887
·
verified ·
1 Parent(s): 41ef973

fixing extensions?

Browse files
files_cells/notebooks/en/downloading_en.ipynb CHANGED
@@ -80,6 +80,7 @@
80
  " %conda update -q -n base conda\n",
81
  " %conda install -q -y aria2\n",
82
  " %conda install -q -y glib\n",
 
83
  "\n",
84
  " !wget -P /home/studio-lab-user https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/FULL_DELETED_NOTEBOOK.ipynb\n",
85
  "\n",
@@ -160,6 +161,12 @@
160
  " print(f\"⌚️ You have been conducting this session for - \\033[33m{time_since_start}\\033[0m\")\n",
161
  "\n",
162
  "\n",
 
 
 
 
 
 
163
  "## Changes extensions and WebUi\n",
164
  "if latest_webui or latest_exstensions:\n",
165
  " action = \"Updating WebUI and Extensions\" if latest_webui and latest_exstensions else (\"WebUI Update\" if latest_webui else \"Update Extensions\")\n",
@@ -176,7 +183,10 @@
176
  "\n",
177
  " ## Update extensions\n",
178
  " if latest_exstensions:\n",
179
- " !{'for dir in ' + webui_path + '/extensions/*/; do cd \\\"$dir\\\" && git reset --hard && git pull; done'}\n",
 
 
 
180
  "\n",
181
  " !cd {webui_path}/repositories/stable-diffusion-stability-ai && git restore .\n",
182
  " del cap\n",
@@ -463,7 +473,18 @@
463
  "!find {extensions_dir}/ -mindepth 1 -maxdepth 1 ! -name '*.txt' -printf '%f\\n'\n",
464
  "if any(not file.endswith(('.txt', '.yaml')) for file in os.listdir(control_dir)):\n",
465
  " print(\"\\n\\033[33m➤ ControlNet\\033[0m\")\n",
466
- " !find {control_dir}/ -mindepth 1 ! -name '*.yaml' -printf '%f\\n' | sed 's/^[^_]*_[^_]*_[^_]*_\\(.*\\)_fp16\\.safetensors$/\\1/'"
 
 
 
 
 
 
 
 
 
 
 
467
  ],
468
  "metadata": {
469
  "id": "2lJmbqrs3Mu8"
 
80
  " %conda update -q -n base conda\n",
81
  " %conda install -q -y aria2\n",
82
  " %conda install -q -y glib\n",
83
+ " !pip install tensorflow\n",
84
  "\n",
85
  " !wget -P /home/studio-lab-user https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/FULL_DELETED_NOTEBOOK.ipynb\n",
86
  "\n",
 
161
  " print(f\"⌚️ You have been conducting this session for - \\033[33m{time_since_start}\\033[0m\")\n",
162
  "\n",
163
  "\n",
164
+ "# === ONLY SAGEMAKER FIXIN EXTENSIONS ===\n",
165
+ "if env == \"SageMaker Studio Lab\":\n",
166
+ " # --- SuperMerger ---\n",
167
+ " !wget -O {webui_path}/extensions/supermerger/scripts/mergers/mergers.py https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/fixing/extensions/supermerger/scripts/mergers/mergers.py\n",
168
+ "\n",
169
+ "\n",
170
  "## Changes extensions and WebUi\n",
171
  "if latest_webui or latest_exstensions:\n",
172
  " action = \"Updating WebUI and Extensions\" if latest_webui and latest_exstensions else (\"WebUI Update\" if latest_webui else \"Update Extensions\")\n",
 
183
  "\n",
184
  " ## Update extensions\n",
185
  " if latest_exstensions:\n",
186
+ " if env != \"SageMaker Studio Lab\":\n",
187
+ " !{'for dir in ' + webui_path + '/extensions/*/; do cd \\\"$dir\\\" && git reset --hard && git pull; done'}\n",
188
+ " else:\n",
189
+ " !{'for dir in /home/studio-lab-user/content/sdw/extensions/*/; do cd \\\"$dir\\\" && git fetch origin && git pull; done'}\n",
190
  "\n",
191
  " !cd {webui_path}/repositories/stable-diffusion-stability-ai && git restore .\n",
192
  " del cap\n",
 
473
  "!find {extensions_dir}/ -mindepth 1 -maxdepth 1 ! -name '*.txt' -printf '%f\\n'\n",
474
  "if any(not file.endswith(('.txt', '.yaml')) for file in os.listdir(control_dir)):\n",
475
  " print(\"\\n\\033[33m➤ ControlNet\\033[0m\")\n",
476
+ " !find {control_dir}/ -mindepth 1 ! -name '*.yaml' -printf '%f\\n' | sed 's/^[^_]*_[^_]*_[^_]*_\\(.*\\)_fp16\\.safetensors$/\\1/'\n",
477
+ "\n",
478
+ "\n",
479
+ "# === ONLY SAGEMAKER ===\n",
480
+ "if env == \"SageMaker Studio Lab\":\n",
481
+ " with capture.capture_output() as cap:\n",
482
+ " !rm -rf /home/studio-lab-user/.conda/envs/studiolab-safemode\n",
483
+ " !rm -rf /home/studio-lab-user/.conda/envs/sagemaker-distribution\n",
484
+ " !rm -rf /home/studio-lab-user/.conda/pkgs/cache\n",
485
+ " !pip cache purge\n",
486
+ " !rm -rf ~/.cache\n",
487
+ " del cap"
488
  ],
489
  "metadata": {
490
  "id": "2lJmbqrs3Mu8"
files_cells/notebooks/en/launch_en.ipynb CHANGED
@@ -87,6 +87,8 @@
87
  "# automatic fixing path V2\n",
88
  "!sed -i 's#\"tagger_hf_cache_dir\": \".*models/interrogators\"#\"tagger_hf_cache_dir\": \"{root_path}/sdw/models/interrogators\"#' {webui_path}/config.json\n",
89
  "!sed -i 's#\"additional_networks_extra_lora_path\": \".*models/Lora/\"#\"additional_networks_extra_lora_path\": \"{root_path}/sdw/models/Lora/\"#' {webui_path}/config.json\n",
 
 
90
  "\n",
91
  "\n",
92
  "if env != \"SageMaker Studio Lab\":\n",
 
87
  "# automatic fixing path V2\n",
88
  "!sed -i 's#\"tagger_hf_cache_dir\": \".*models/interrogators\"#\"tagger_hf_cache_dir\": \"{root_path}/sdw/models/interrogators\"#' {webui_path}/config.json\n",
89
  "!sed -i 's#\"additional_networks_extra_lora_path\": \".*models/Lora/\"#\"additional_networks_extra_lora_path\": \"{root_path}/sdw/models/Lora/\"#' {webui_path}/config.json\n",
90
+ "# ---\n",
91
+ "!sed -i 's/\"sd_checkpoint_hash\": \".*\"/\"sd_checkpoint_hash\": \"\"/g; s/\"sd_model_checkpoint\": \".*\"/\"sd_model_checkpoint\": \"\"/g; s/\"sd_vae\": \".*\"/\"sd_vae\": \"None\"/g' {webui_path}/config.json\n",
92
  "\n",
93
  "\n",
94
  "if env != \"SageMaker Studio Lab\":\n",
files_cells/notebooks/ru/downloading_ru.ipynb CHANGED
@@ -80,6 +80,7 @@
80
  " %conda update -q -n base conda\n",
81
  " %conda install -q -y aria2\n",
82
  " %conda install -q -y glib\n",
 
83
  "\n",
84
  " !wget -P /home/studio-lab-user https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/FULL_DELETED_NOTEBOOK.ipynb\n",
85
  "\n",
@@ -160,6 +161,12 @@
160
  " print(f\"⌚️ Вы проводите эту сессию в течение - \\033[33m{time_since_start}\\033[0m\")\n",
161
  "\n",
162
  "\n",
 
 
 
 
 
 
163
  "## Changes extensions and WebUi\n",
164
  "if latest_webui or latest_exstensions:\n",
165
  " action = \"Обновление WebUI и Расширений\" if latest_webui and latest_exstensions else (\"Обновление WebUI\" if latest_webui else \"Обновление Расширений\")\n",
@@ -176,7 +183,10 @@
176
  "\n",
177
  " ## Update extensions\n",
178
  " if latest_exstensions:\n",
179
- " !{'for dir in ' + webui_path + '/extensions/*/; do cd \\\"$dir\\\" && git reset --hard && git pull; done'}\n",
 
 
 
180
  "\n",
181
  " !cd {webui_path}/repositories/stable-diffusion-stability-ai && git restore .\n",
182
  " del cap\n",
@@ -463,7 +473,18 @@
463
  "!find {extensions_dir}/ -mindepth 1 -maxdepth 1 ! -name '*.txt' -printf '%f\\n'\n",
464
  "if any(not file.endswith(('.txt', '.yaml')) for file in os.listdir(control_dir)):\n",
465
  " print(\"\\n\\033[33m➤ ControlNet\\033[0m\")\n",
466
- " !find {control_dir}/ -mindepth 1 ! -name '*.yaml' -printf '%f\\n' | sed 's/^[^_]*_[^_]*_[^_]*_\\(.*\\)_fp16\\.safetensors$/\\1/'"
 
 
 
 
 
 
 
 
 
 
 
467
  ],
468
  "metadata": {
469
  "id": "2lJmbqrs3Mu8"
 
80
  " %conda update -q -n base conda\n",
81
  " %conda install -q -y aria2\n",
82
  " %conda install -q -y glib\n",
83
+ " !pip install tensorflow\n",
84
  "\n",
85
  " !wget -P /home/studio-lab-user https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/FULL_DELETED_NOTEBOOK.ipynb\n",
86
  "\n",
 
161
  " print(f\"⌚️ Вы проводите эту сессию в течение - \\033[33m{time_since_start}\\033[0m\")\n",
162
  "\n",
163
  "\n",
164
+ "# === ONLY SAGEMAKER FIXIN EXTENSIONS ===\n",
165
+ "if env == \"SageMaker Studio Lab\":\n",
166
+ " # --- SuperMerger ---\n",
167
+ " !wget -O {webui_path}/extensions/supermerger/scripts/mergers/mergers.py https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/fixing/extensions/supermerger/scripts/mergers/mergers.py\n",
168
+ "\n",
169
+ "\n",
170
  "## Changes extensions and WebUi\n",
171
  "if latest_webui or latest_exstensions:\n",
172
  " action = \"Обновление WebUI и Расширений\" if latest_webui and latest_exstensions else (\"Обновление WebUI\" if latest_webui else \"Обновление Расширений\")\n",
 
183
  "\n",
184
  " ## Update extensions\n",
185
  " if latest_exstensions:\n",
186
+ " if env != \"SageMaker Studio Lab\":\n",
187
+ " !{'for dir in ' + webui_path + '/extensions/*/; do cd \\\"$dir\\\" && git reset --hard && git pull; done'}\n",
188
+ " else:\n",
189
+ " !{'for dir in /home/studio-lab-user/content/sdw/extensions/*/; do cd \\\"$dir\\\" && git fetch origin && git pull; done'}\n",
190
  "\n",
191
  " !cd {webui_path}/repositories/stable-diffusion-stability-ai && git restore .\n",
192
  " del cap\n",
 
473
  "!find {extensions_dir}/ -mindepth 1 -maxdepth 1 ! -name '*.txt' -printf '%f\\n'\n",
474
  "if any(not file.endswith(('.txt', '.yaml')) for file in os.listdir(control_dir)):\n",
475
  " print(\"\\n\\033[33m➤ ControlNet\\033[0m\")\n",
476
+ " !find {control_dir}/ -mindepth 1 ! -name '*.yaml' -printf '%f\\n' | sed 's/^[^_]*_[^_]*_[^_]*_\\(.*\\)_fp16\\.safetensors$/\\1/'\n",
477
+ "\n",
478
+ "\n",
479
+ "# === ONLY SAGEMAKER ===\n",
480
+ "if env == \"SageMaker Studio Lab\":\n",
481
+ " with capture.capture_output() as cap:\n",
482
+ " !rm -rf /home/studio-lab-user/.conda/envs/studiolab-safemode\n",
483
+ " !rm -rf /home/studio-lab-user/.conda/envs/sagemaker-distribution\n",
484
+ " !rm -rf /home/studio-lab-user/.conda/pkgs/cache\n",
485
+ " !pip cache purge\n",
486
+ " !rm -rf ~/.cache\n",
487
+ " del cap"
488
  ],
489
  "metadata": {
490
  "id": "2lJmbqrs3Mu8"
files_cells/notebooks/ru/launch_ru.ipynb CHANGED
@@ -87,6 +87,8 @@
87
  "# automatic fixing path V2\n",
88
  "!sed -i 's#\"tagger_hf_cache_dir\": \".*models/interrogators\"#\"tagger_hf_cache_dir\": \"{root_path}/sdw/models/interrogators\"#' {webui_path}/config.json\n",
89
  "!sed -i 's#\"additional_networks_extra_lora_path\": \".*models/Lora/\"#\"additional_networks_extra_lora_path\": \"{root_path}/sdw/models/Lora/\"#' {webui_path}/config.json\n",
 
 
90
  "\n",
91
  "\n",
92
  "if env != \"SageMaker Studio Lab\":\n",
 
87
  "# automatic fixing path V2\n",
88
  "!sed -i 's#\"tagger_hf_cache_dir\": \".*models/interrogators\"#\"tagger_hf_cache_dir\": \"{root_path}/sdw/models/interrogators\"#' {webui_path}/config.json\n",
89
  "!sed -i 's#\"additional_networks_extra_lora_path\": \".*models/Lora/\"#\"additional_networks_extra_lora_path\": \"{root_path}/sdw/models/Lora/\"#' {webui_path}/config.json\n",
90
+ "# ---\n",
91
+ "!sed -i 's/\"sd_checkpoint_hash\": \".*\"/\"sd_checkpoint_hash\": \"\"/g; s/\"sd_model_checkpoint\": \".*\"/\"sd_model_checkpoint\": \"\"/g; s/\"sd_vae\": \".*\"/\"sd_vae\": \"None\"/g' {webui_path}/config.json\n",
92
  "\n",
93
  "\n",
94
  "if env != \"SageMaker Studio Lab\":\n",
files_cells/python/en/downloading_en.py CHANGED
@@ -67,6 +67,7 @@ if not os.path.exists(flag_file):
67
  get_ipython().run_line_magic('conda', 'update -q -n base conda')
68
  get_ipython().run_line_magic('conda', 'install -q -y aria2')
69
  get_ipython().run_line_magic('conda', 'install -q -y glib')
 
70
 
71
  get_ipython().system('wget -P /home/studio-lab-user https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/FULL_DELETED_NOTEBOOK.ipynb')
72
 
@@ -147,6 +148,12 @@ else:
147
  print(f"⌚️ You have been conducting this session for - \033[33m{time_since_start}\033[0m")
148
 
149
 
 
 
 
 
 
 
150
  ## Changes extensions and WebUi
151
  if latest_webui or latest_exstensions:
152
  action = "Updating WebUI and Extensions" if latest_webui and latest_exstensions else ("WebUI Update" if latest_webui else "Update Extensions")
@@ -163,7 +170,10 @@ if latest_webui or latest_exstensions:
163
 
164
  ## Update extensions
165
  if latest_exstensions:
166
- get_ipython().system('{\'for dir in \' + webui_path + \'/extensions/*/; do cd \\"$dir\\" && git reset --hard && git pull; done\'}')
 
 
 
167
 
168
  get_ipython().system('cd {webui_path}/repositories/stable-diffusion-stability-ai && git restore .')
169
  del cap
@@ -449,3 +459,14 @@ if any(not file.endswith(('.txt', '.yaml')) for file in os.listdir(control_dir))
449
  print("\n\033[33m➤ ControlNet\033[0m")
450
  get_ipython().system("find {control_dir}/ -mindepth 1 ! -name '*.yaml' -printf '%f\\n' | sed 's/^[^_]*_[^_]*_[^_]*_\\(.*\\)_fp16\\.safetensors$/\\1/'")
451
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  get_ipython().run_line_magic('conda', 'update -q -n base conda')
68
  get_ipython().run_line_magic('conda', 'install -q -y aria2')
69
  get_ipython().run_line_magic('conda', 'install -q -y glib')
70
+ get_ipython().system('pip install tensorflow')
71
 
72
  get_ipython().system('wget -P /home/studio-lab-user https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/FULL_DELETED_NOTEBOOK.ipynb')
73
 
 
148
  print(f"⌚️ You have been conducting this session for - \033[33m{time_since_start}\033[0m")
149
 
150
 
151
+ # === ONLY SAGEMAKER FIXIN EXTENSIONS ===
152
+ if env == "SageMaker Studio Lab":
153
+ # --- SuperMerger ---
154
+ get_ipython().system('wget -O {webui_path}/extensions/supermerger/scripts/mergers/mergers.py https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/fixing/extensions/supermerger/scripts/mergers/mergers.py')
155
+
156
+
157
  ## Changes extensions and WebUi
158
  if latest_webui or latest_exstensions:
159
  action = "Updating WebUI and Extensions" if latest_webui and latest_exstensions else ("WebUI Update" if latest_webui else "Update Extensions")
 
170
 
171
  ## Update extensions
172
  if latest_exstensions:
173
+ if env != "SageMaker Studio Lab":
174
+ get_ipython().system('{\'for dir in \' + webui_path + \'/extensions/*/; do cd \\"$dir\\" && git reset --hard && git pull; done\'}')
175
+ else:
176
+ get_ipython().system('{\'for dir in /home/studio-lab-user/content/sdw/extensions/*/; do cd \\"$dir\\" && git fetch origin && git pull; done\'}')
177
 
178
  get_ipython().system('cd {webui_path}/repositories/stable-diffusion-stability-ai && git restore .')
179
  del cap
 
459
  print("\n\033[33m➤ ControlNet\033[0m")
460
  get_ipython().system("find {control_dir}/ -mindepth 1 ! -name '*.yaml' -printf '%f\\n' | sed 's/^[^_]*_[^_]*_[^_]*_\\(.*\\)_fp16\\.safetensors$/\\1/'")
461
 
462
+
463
+ # === ONLY SAGEMAKER ===
464
+ if env == "SageMaker Studio Lab":
465
+ with capture.capture_output() as cap:
466
+ get_ipython().system('rm -rf /home/studio-lab-user/.conda/envs/studiolab-safemode')
467
+ get_ipython().system('rm -rf /home/studio-lab-user/.conda/envs/sagemaker-distribution')
468
+ get_ipython().system('rm -rf /home/studio-lab-user/.conda/pkgs/cache')
469
+ get_ipython().system('pip cache purge')
470
+ get_ipython().system('rm -rf ~/.cache')
471
+ del cap
472
+
files_cells/python/en/launch_en.py CHANGED
@@ -69,6 +69,8 @@ if env != "SageMaker Studio Lab":
69
  # automatic fixing path V2
70
  get_ipython().system('sed -i \'s#"tagger_hf_cache_dir": ".*models/interrogators"#"tagger_hf_cache_dir": "{root_path}/sdw/models/interrogators"#\' {webui_path}/config.json')
71
  get_ipython().system('sed -i \'s#"additional_networks_extra_lora_path": ".*models/Lora/"#"additional_networks_extra_lora_path": "{root_path}/sdw/models/Lora/"#\' {webui_path}/config.json')
 
 
72
 
73
 
74
  if env != "SageMaker Studio Lab":
 
69
  # automatic fixing path V2
70
  get_ipython().system('sed -i \'s#"tagger_hf_cache_dir": ".*models/interrogators"#"tagger_hf_cache_dir": "{root_path}/sdw/models/interrogators"#\' {webui_path}/config.json')
71
  get_ipython().system('sed -i \'s#"additional_networks_extra_lora_path": ".*models/Lora/"#"additional_networks_extra_lora_path": "{root_path}/sdw/models/Lora/"#\' {webui_path}/config.json')
72
+ # ---
73
+ get_ipython().system('sed -i \'s/"sd_checkpoint_hash": ".*"/"sd_checkpoint_hash": ""/g; s/"sd_model_checkpoint": ".*"/"sd_model_checkpoint": ""/g; s/"sd_vae": ".*"/"sd_vae": "None"/g\' {webui_path}/config.json')
74
 
75
 
76
  if env != "SageMaker Studio Lab":
files_cells/python/ru/downloading_ru.py CHANGED
@@ -67,6 +67,7 @@ if not os.path.exists(flag_file):
67
  get_ipython().run_line_magic('conda', 'update -q -n base conda')
68
  get_ipython().run_line_magic('conda', 'install -q -y aria2')
69
  get_ipython().run_line_magic('conda', 'install -q -y glib')
 
70
 
71
  get_ipython().system('wget -P /home/studio-lab-user https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/FULL_DELETED_NOTEBOOK.ipynb')
72
 
@@ -147,6 +148,12 @@ else:
147
  print(f"⌚️ Вы проводите эту сессию в течение - \033[33m{time_since_start}\033[0m")
148
 
149
 
 
 
 
 
 
 
150
  ## Changes extensions and WebUi
151
  if latest_webui or latest_exstensions:
152
  action = "Обновление WebUI и Расширений" if latest_webui and latest_exstensions else ("Обновление WebUI" if latest_webui else "Обновление Расширений")
@@ -163,7 +170,10 @@ if latest_webui or latest_exstensions:
163
 
164
  ## Update extensions
165
  if latest_exstensions:
166
- get_ipython().system('{\'for dir in \' + webui_path + \'/extensions/*/; do cd \\"$dir\\" && git reset --hard && git pull; done\'}')
 
 
 
167
 
168
  get_ipython().system('cd {webui_path}/repositories/stable-diffusion-stability-ai && git restore .')
169
  del cap
@@ -449,3 +459,14 @@ if any(not file.endswith(('.txt', '.yaml')) for file in os.listdir(control_dir))
449
  print("\n\033[33m➤ ControlNet\033[0m")
450
  get_ipython().system("find {control_dir}/ -mindepth 1 ! -name '*.yaml' -printf '%f\\n' | sed 's/^[^_]*_[^_]*_[^_]*_\\(.*\\)_fp16\\.safetensors$/\\1/'")
451
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  get_ipython().run_line_magic('conda', 'update -q -n base conda')
68
  get_ipython().run_line_magic('conda', 'install -q -y aria2')
69
  get_ipython().run_line_magic('conda', 'install -q -y glib')
70
+ get_ipython().system('pip install tensorflow')
71
 
72
  get_ipython().system('wget -P /home/studio-lab-user https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/FULL_DELETED_NOTEBOOK.ipynb')
73
 
 
148
  print(f"⌚️ Вы проводите эту сессию в течение - \033[33m{time_since_start}\033[0m")
149
 
150
 
151
+ # === ONLY SAGEMAKER FIXIN EXTENSIONS ===
152
+ if env == "SageMaker Studio Lab":
153
+ # --- SuperMerger ---
154
+ get_ipython().system('wget -O {webui_path}/extensions/supermerger/scripts/mergers/mergers.py https://huggingface.co/NagisaNao/fast_repo/resolve/main/sagemaker/fixing/extensions/supermerger/scripts/mergers/mergers.py')
155
+
156
+
157
  ## Changes extensions and WebUi
158
  if latest_webui or latest_exstensions:
159
  action = "Обновление WebUI и Расширений" if latest_webui and latest_exstensions else ("Обновление WebUI" if latest_webui else "Обновление Расширений")
 
170
 
171
  ## Update extensions
172
  if latest_exstensions:
173
+ if env != "SageMaker Studio Lab":
174
+ get_ipython().system('{\'for dir in \' + webui_path + \'/extensions/*/; do cd \\"$dir\\" && git reset --hard && git pull; done\'}')
175
+ else:
176
+ get_ipython().system('{\'for dir in /home/studio-lab-user/content/sdw/extensions/*/; do cd \\"$dir\\" && git fetch origin && git pull; done\'}')
177
 
178
  get_ipython().system('cd {webui_path}/repositories/stable-diffusion-stability-ai && git restore .')
179
  del cap
 
459
  print("\n\033[33m➤ ControlNet\033[0m")
460
  get_ipython().system("find {control_dir}/ -mindepth 1 ! -name '*.yaml' -printf '%f\\n' | sed 's/^[^_]*_[^_]*_[^_]*_\\(.*\\)_fp16\\.safetensors$/\\1/'")
461
 
462
+
463
+ # === ONLY SAGEMAKER ===
464
+ if env == "SageMaker Studio Lab":
465
+ with capture.capture_output() as cap:
466
+ get_ipython().system('rm -rf /home/studio-lab-user/.conda/envs/studiolab-safemode')
467
+ get_ipython().system('rm -rf /home/studio-lab-user/.conda/envs/sagemaker-distribution')
468
+ get_ipython().system('rm -rf /home/studio-lab-user/.conda/pkgs/cache')
469
+ get_ipython().system('pip cache purge')
470
+ get_ipython().system('rm -rf ~/.cache')
471
+ del cap
472
+
files_cells/python/ru/launch_ru.py CHANGED
@@ -69,6 +69,8 @@ if env != "SageMaker Studio Lab":
69
  # automatic fixing path V2
70
  get_ipython().system('sed -i \'s#"tagger_hf_cache_dir": ".*models/interrogators"#"tagger_hf_cache_dir": "{root_path}/sdw/models/interrogators"#\' {webui_path}/config.json')
71
  get_ipython().system('sed -i \'s#"additional_networks_extra_lora_path": ".*models/Lora/"#"additional_networks_extra_lora_path": "{root_path}/sdw/models/Lora/"#\' {webui_path}/config.json')
 
 
72
 
73
 
74
  if env != "SageMaker Studio Lab":
 
69
  # automatic fixing path V2
70
  get_ipython().system('sed -i \'s#"tagger_hf_cache_dir": ".*models/interrogators"#"tagger_hf_cache_dir": "{root_path}/sdw/models/interrogators"#\' {webui_path}/config.json')
71
  get_ipython().system('sed -i \'s#"additional_networks_extra_lora_path": ".*models/Lora/"#"additional_networks_extra_lora_path": "{root_path}/sdw/models/Lora/"#\' {webui_path}/config.json')
72
+ # ---
73
+ get_ipython().system('sed -i \'s/"sd_checkpoint_hash": ".*"/"sd_checkpoint_hash": ""/g; s/"sd_model_checkpoint": ".*"/"sd_model_checkpoint": ""/g; s/"sd_vae": ".*"/"sd_vae": "None"/g\' {webui_path}/config.json')
74
 
75
 
76
  if env != "SageMaker Studio Lab":