Update visomaster/visomaster_install.py
Browse files- visomaster/visomaster_install.py +19 -10
visomaster/visomaster_install.py
CHANGED
@@ -100,24 +100,33 @@ def download_models():
|
|
100 |
download_with_requests(models_url, models_name)
|
101 |
extract_archive(models_name, models_path)
|
102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
if __name__ == "__main__":
|
104 |
clear_terminal()
|
105 |
-
if not os.path.exists(cuda_archive_path):
|
106 |
-
download_with_requests(cuda_url, cuda_archive_path)
|
107 |
-
clear_terminal()
|
108 |
if not os.path.exists(cuda_extract_dir):
|
|
|
109 |
extract_archive(cuda_archive_path, cuda_extract_dir)
|
110 |
-
clear_terminal()
|
111 |
-
if os.path.exists(cuda_extract_dir):
|
112 |
os.remove(cuda_archive_path)
|
113 |
-
|
|
|
114 |
|
115 |
-
clone_git_repo(git_repo_url, visomaster_dir)
|
116 |
setup_cuda_paths()
|
117 |
install_requirements()
|
118 |
-
|
119 |
-
|
120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
clear_terminal()
|
122 |
|
123 |
print("Установка завершена!")
|
|
|
100 |
download_with_requests(models_url, models_name)
|
101 |
extract_archive(models_name, models_path)
|
102 |
|
103 |
+
def has_safetensors_files(directory):
|
104 |
+
for filename in os.listdir(directory):
|
105 |
+
if filename.endswith(".safetensors"):
|
106 |
+
return True
|
107 |
+
return False
|
108 |
+
|
109 |
if __name__ == "__main__":
|
110 |
clear_terminal()
|
|
|
|
|
|
|
111 |
if not os.path.exists(cuda_extract_dir):
|
112 |
+
download_with_requests(cuda_url, cuda_archive_path)
|
113 |
extract_archive(cuda_archive_path, cuda_extract_dir)
|
|
|
|
|
114 |
os.remove(cuda_archive_path)
|
115 |
+
if not os.path.exists(visomaster_dir):
|
116 |
+
clone_git_repo(git_repo_url, visomaster_dir)
|
117 |
|
|
|
118 |
setup_cuda_paths()
|
119 |
install_requirements()
|
120 |
+
if not os.path.exists(updater_bat) or os.path.exists(start_bat):
|
121 |
+
download_bat()
|
122 |
+
if not os.path.exists(ffmpeg_path):
|
123 |
+
download_ffmpeg()
|
124 |
+
|
125 |
+
if has_safetensors_files(models_path):
|
126 |
+
pass
|
127 |
+
else:
|
128 |
+
download_models()
|
129 |
+
|
130 |
clear_terminal()
|
131 |
|
132 |
print("Установка завершена!")
|