lang03383 commited on
Commit
4265cb6
·
verified ·
1 Parent(s): 2a5927d

Update sd_yun/downloading_en.py

Browse files
Files changed (1) hide show
  1. sd_yun/downloading_en.py +15 -15
sd_yun/downloading_en.py CHANGED
@@ -106,21 +106,21 @@ if not os.path.exists(flag_file):
106
  start_colab = int(os.environ.get("START_COLAB", time.time() - 5))
107
  os.environ["START_COLAB"] = str(start_colab)
108
 
109
- # def download_cfg_files(file_paths, destination_path):
110
- # base_url = "https://huggingface.co/NagisaNao/SD-CONFIGS/resolve/main"
111
- # for filename in file_paths:
112
- # file_name = filename.split('/')[-1]
113
- # get_ipython().system('wget -O {destination_path}/{file_name} {base_url}/{filename}')
114
-
115
- # def cfg_download():
116
- # common_files = ["styles.csv"]
117
- # a1111_files = ["A1111/config.json", "A1111/ui-config.json"]
118
- # forge_files = ["reForge/config.json", "reForge/ui-config.json"]
119
-
120
- # with capture.capture_output():
121
- # download_cfg_files(common_files, webui_path)
122
- # ui_files = a1111_files if UI == 'A1111' else forge_files
123
- # download_cfg_files(ui_files, webui_path)
124
 
125
  def remove_dir(directory_path):
126
  if directory_path and os.path.exists(directory_path):
 
106
  start_colab = int(os.environ.get("START_COLAB", time.time() - 5))
107
  os.environ["START_COLAB"] = str(start_colab)
108
 
109
+ def download_cfg_files(file_paths, destination_path):
110
+ base_url = "https://huggingface.co/NagisaNao/SD-CONFIGS/resolve/main"
111
+ for filename in file_paths:
112
+ file_name = filename.split('/')[-1]
113
+ get_ipython().system('wget -O {destination_path}/{file_name} {base_url}/{filename}')
114
+
115
+ def cfg_download():
116
+ # common_files = ["styles.csv"]
117
+ # a1111_files = ["A1111/config.json", "A1111/ui-config.json"]
118
+ # forge_files = ["reForge/config.json", "reForge/ui-config.json"]
119
+
120
+ with capture.capture_output():
121
+ download_cfg_files(common_files, webui_path)
122
+ ui_files = a1111_files if UI == 'A1111' else forge_files
123
+ download_cfg_files(ui_files, webui_path)
124
 
125
  def remove_dir(directory_path):
126
  if directory_path and os.path.exists(directory_path):