From 61efd606816342cb6b818042b543c518f48e94a2 Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Fri, 16 Aug 2024 00:07:19 +0900 Subject: [PATCH] feat: complete pip freezing for torch, torchsde, torchvision --- cm-cli.py | 1 + glob/manager_core.py | 8 +++++++- prestartup_script.py | 4 ++++ pyproject.toml | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/cm-cli.py b/cm-cli.py index f2327093..61b29833 100644 --- a/cm-cli.py +++ b/cm-cli.py @@ -35,6 +35,7 @@ pip_overrides_path = os.path.join(comfyui_manager_path, "pip_overrides.json") git_script_path = os.path.join(comfyui_manager_path, "git_helper.py") +cm_global.pip_blacklist = ['torch', 'torchsde', 'torchvision'] cm_global.pip_downgrade_blacklist = ['torch', 'torchsde', 'torchvision', 'transformers', 'safetensors', 'kornia'] cm_global.pip_overrides = {} if os.path.exists(pip_overrides_path): diff --git a/glob/manager_core.py b/glob/manager_core.py index 0554c560..343ea206 100644 --- a/glob/manager_core.py +++ b/glob/manager_core.py @@ -23,7 +23,7 @@ import cm_global from manager_util import * -version = [2, 48, 8] +version = [2, 49] version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '') @@ -103,6 +103,9 @@ def is_blacklisted(name): if match: name = match.group(1) + if name in cm_global.pip_blacklist: + return True + if name in cm_global.pip_downgrade_blacklist: pips = get_installed_packages() @@ -129,6 +132,9 @@ def is_installed(name): if match: name = match.group(1) + if name in cm_global.pip_blacklist: + return True + if name in cm_global.pip_downgrade_blacklist: pips = get_installed_packages() diff --git a/prestartup_script.py b/prestartup_script.py index 884a0891..2acec608 100644 --- a/prestartup_script.py +++ b/prestartup_script.py @@ -20,6 +20,7 @@ security_check.security_check() +cm_global.pip_blacklist = ['torch', 'torchsde', 'torchvision'] cm_global.pip_downgrade_blacklist = ['torch', 'torchsde', 'torchvision', 'transformers', 'safetensors', 'kornia'] @@ -454,6 +455,9 @@ def is_installed(name): if match: name = match.group(1) + if name in cm_global.pip_blacklist: + return True + if name in cm_global.pip_downgrade_blacklist: pips = get_installed_packages() diff --git a/pyproject.toml b/pyproject.toml index 2a5a6fe9..4bf1d01b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-manager" description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI." -version = "2.48.8" +version = "2.49" license = { file = "LICENSE.txt" } dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions"]