Browse Source

refactoring cm-cli.py based on typer

fix: git_helper - --pip-non-url isn't working properly
pull/681/head
Dr.Lt.Data 6 months ago
parent
commit
9b5a2530fd
  1. 991
      cm-cli.py
  2. 2
      git_helper.py
  3. 3
      glob/manager_core.py
  4. 3
      requirements.txt

991
cm-cli.py

File diff suppressed because it is too large Load Diff

2
git_helper.py

@ -336,7 +336,7 @@ def restore_pip_snapshot(pips, options):
non_local_url = [] non_local_url = []
for k, v in pips.items(): for k, v in pips.items():
if v == "": if v == "":
non_url.append(v) non_url.append(k)
else: else:
if v.startswith('file:'): if v.startswith('file:'):
local_url.append(v) local_url.append(v)

3
glob/manager_core.py

@ -23,7 +23,7 @@ sys.path.append(glob_path)
import cm_global import cm_global
from manager_util import * from manager_util import *
version = [2, 33] version = [2, 34]
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '') version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
comfyui_manager_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) comfyui_manager_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
@ -978,7 +978,6 @@ def get_current_snapshot():
# Get ComfyUI hash # Get ComfyUI hash
repo_path = comfy_path repo_path = comfy_path
print(f"comfy_path: {comfy_path}")
if not os.path.exists(os.path.join(repo_path, '.git')): if not os.path.exists(os.path.join(repo_path, '.git')):
print(f"ComfyUI update fail: The installed ComfyUI does not have a Git repository.") print(f"ComfyUI update fail: The installed ComfyUI does not have a Git repository.")
return {} return {}

3
requirements.txt

@ -3,3 +3,6 @@ PyGithub
matrix-client==0.4.0 matrix-client==0.4.0
transformers transformers
huggingface-hub>0.20 huggingface-hub>0.20
typer
rich
typing-extensions
Loading…
Cancel
Save