Update install_modules.py
Browse files- install_modules.py +7 -6
install_modules.py
CHANGED
|
@@ -98,7 +98,7 @@ if __name__ == "__main__":
|
|
| 98 |
"https://github.com/comfyanonymous/ComfyUI"
|
| 99 |
])
|
| 100 |
|
| 101 |
-
# Обновление
|
| 102 |
modules_to_uninstall = ["numpy", "onnxruntime", "onnxruntime-gpu"]
|
| 103 |
for module in modules_to_uninstall:
|
| 104 |
uninstall_module(module, python_path)
|
|
@@ -127,13 +127,10 @@ if __name__ == "__main__":
|
|
| 127 |
filename = "insightface-0.7.3-cp311-cp311-win_amd64.whl"
|
| 128 |
download_file(url, filename)
|
| 129 |
|
| 130 |
-
# Установка модуля из файла .whl
|
| 131 |
install_module(filename, python_path)
|
| 132 |
|
| 133 |
-
# Установка
|
| 134 |
-
onnxruntime_index = "https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/"
|
| 135 |
-
install_from_index("onnxruntime-gpu", onnxruntime_index, python_path)
|
| 136 |
-
|
| 137 |
modules_to_install = ["torch", "torchvision", "torchaudio"]
|
| 138 |
pytorch_index = "https://download.pytorch.org/whl/cu124"
|
| 139 |
for module in modules_to_install:
|
|
@@ -142,5 +139,9 @@ if __name__ == "__main__":
|
|
| 142 |
# install_from_index("torch", pytorch_index, python_path)
|
| 143 |
# install_from_index("torchvision", pytorch_index, python_path)
|
| 144 |
# install_from_index("torchaudio", pytorch_index, python_path)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 145 |
|
| 146 |
print(colored("Установка завершена.", 'green'))
|
|
|
|
| 98 |
"https://github.com/comfyanonymous/ComfyUI"
|
| 99 |
])
|
| 100 |
|
| 101 |
+
# Обновление numpy/onnxruntime/onnxruntime-gpu
|
| 102 |
modules_to_uninstall = ["numpy", "onnxruntime", "onnxruntime-gpu"]
|
| 103 |
for module in modules_to_uninstall:
|
| 104 |
uninstall_module(module, python_path)
|
|
|
|
| 127 |
filename = "insightface-0.7.3-cp311-cp311-win_amd64.whl"
|
| 128 |
download_file(url, filename)
|
| 129 |
|
| 130 |
+
# Установка модуля из файла insightface-0.7.3-cp311-cp311-win_amd64.whl
|
| 131 |
install_module(filename, python_path)
|
| 132 |
|
| 133 |
+
# Установка torch/torchvision/torchaudio
|
|
|
|
|
|
|
|
|
|
| 134 |
modules_to_install = ["torch", "torchvision", "torchaudio"]
|
| 135 |
pytorch_index = "https://download.pytorch.org/whl/cu124"
|
| 136 |
for module in modules_to_install:
|
|
|
|
| 139 |
# install_from_index("torch", pytorch_index, python_path)
|
| 140 |
# install_from_index("torchvision", pytorch_index, python_path)
|
| 141 |
# install_from_index("torchaudio", pytorch_index, python_path)
|
| 142 |
+
|
| 143 |
+
# Установка onnxruntime-gpu из сетевого ресурса
|
| 144 |
+
onnxruntime_index = "https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/"
|
| 145 |
+
install_from_index("onnxruntime-gpu", onnxruntime_index, python_path)
|
| 146 |
|
| 147 |
print(colored("Установка завершена.", 'green'))
|