From 778cba50bba5c4fea1975bf60535e3571c06dfd9 Mon Sep 17 00:00:00 2001 From: alpertunga-bile Date: Wed, 21 May 2025 22:49:10 +0300 Subject: [PATCH] install and uninstall scripts are removed --- install.py | 45 --------------------------------------------- uninstall.py | 49 ------------------------------------------------- 2 files changed, 94 deletions(-) delete mode 100644 install.py delete mode 100644 uninstall.py diff --git a/install.py b/install.py deleted file mode 100644 index 5cd68bb..0000000 --- a/install.py +++ /dev/null @@ -1,45 +0,0 @@ -import subprocess -import sys -import platform -import generator.utility - -common_packages = [ - "transformers", - "accelerate", - "optimum", - "optimum[onnxruntime-gpu]", - "transformers[sentencepiece]", - "peft", -] - - -def install_packages(packages: list[str]) -> None: - for package in packages: - print(f"/_\\ Installing {package}") - command = f"{sys.executable} -m pip install {package}" - process = subprocess.run(command, shell=True, check=True, capture_output=True) - - if process.returncode != 0: - print(f"{package} installation is failed\nError: {process.stdout}") - - -if __name__ == "__main__": - print(" Prompt Generator ComfyUI Node ".center(100, "-")) - print("/_\\ Thank you for installing Prompt Generator node") - - packages_to_install = [] - packages_to_install.extend(common_packages) - - os_name = platform.system() - - if os_name == "Linux": - packages_to_install.append("triton") - packages_to_install.append("bitsandbytes") - - if os_name != "Linux" and generator.utility.check_torch_version_is_enough(2, 4): - packages_to_install.append("optimum-quanto") - - install_packages(packages_to_install) - - print("/_\\ Installation is compeleted successfully") - print("-" * 100) diff --git a/uninstall.py b/uninstall.py deleted file mode 100644 index b63ebd6..0000000 --- a/uninstall.py +++ /dev/null @@ -1,49 +0,0 @@ -""" - Actually uninstalling packages is not suitable - because they maybe need by other packages too -""" - -""" -import subprocess -import sys -import platform -import generator.utility - -common_packages = [ - "optimum", - "optimum[onnxruntime-gpu]", - "peft", -] - - -def uninstall_packages(packages: list[str]) -> None: - for package in packages: - print(f"/_\\ Uninstalling {package}") - command = f"{sys.executable} -m pip uninstall --yes {package}" - process = subprocess.run(command, shell=True, check=True, capture_output=True) - - if process.returncode != 0: - print(f"{package} uninstallation is failed\nError: {process.stdout}") -""" - - -if __name__ == "__main__": - print(" Prompt Generator ComfyUI Node ".center(100, "-")) - print( - "/_\\ If you have encountered issue(s) please feel free to open issue on repository's Github page" - ) - - """ - packages_to_uninstall = [] - packages_to_uninstall.extend(common_packages) - - os_name = platform.system() - - if os_name != "Linux" and generator.utility.check_torch_version_is_enough(2, 4): - packages_to_uninstall.append("optimum-quanto") - - uninstall_packages(packages_to_uninstall) - """ - - print("/_\\ Uninstallation is compeleted successfully") - print("-" * 100)