mirror of
https://git.datalinker.icu/ltdrdata/ComfyUI-Manager
synced 2025-12-09 22:24:23 +08:00
enhance: cm-cli
- restore-snapshot - arbitrary file path is available - show - show unregistered custom nodes
This commit is contained in:
parent
8ff0f1dac3
commit
7bac97dce0
33
cm-cli.py
33
cm-cli.py
@ -108,6 +108,7 @@ def restore_dependencies():
|
||||
def restore_snapshot(snapshot_name):
|
||||
global processed_install
|
||||
|
||||
if not os.path.exists(snapshot_name):
|
||||
snapshot_path = os.path.join(core.comfyui_manager_path, 'snapshots', snapshot_name)
|
||||
if not os.path.exists(snapshot_path):
|
||||
print(f"ERROR: `{snapshot_path}` is not exists.")
|
||||
@ -420,6 +421,38 @@ def show_list(kind, simple=False):
|
||||
else:
|
||||
print(f"{prefix} {k:50}(author: {v['author']})")
|
||||
|
||||
# unregistered nodes
|
||||
candidates = os.listdir(os.path.realpath(custom_nodes_path))
|
||||
|
||||
for k in candidates:
|
||||
fullpath = os.path.join(custom_nodes_path, k)
|
||||
|
||||
if os.path.isfile(fullpath):
|
||||
continue
|
||||
|
||||
if k in ['__pycache__']:
|
||||
continue
|
||||
|
||||
states = set()
|
||||
if k.endswith('.disabled'):
|
||||
prefix = '[ DISABLED ] '
|
||||
states.add('installed')
|
||||
states.add('disabled')
|
||||
states.add('all')
|
||||
k = k[:-9]
|
||||
else:
|
||||
prefix = '[ ENABLED ] '
|
||||
states.add('installed')
|
||||
states.add('enabled')
|
||||
states.add('all')
|
||||
|
||||
if k not in custom_node_map:
|
||||
if kind in states:
|
||||
if simple:
|
||||
print(f"{k:50}")
|
||||
else:
|
||||
print(f"{prefix} {k:50}(author: N/A)")
|
||||
|
||||
|
||||
def show_snapshot(simple_mode=False):
|
||||
json_obj = core.get_current_snapshot()
|
||||
|
||||
@ -21,7 +21,7 @@ sys.path.append(glob_path)
|
||||
import cm_global
|
||||
from manager_util import *
|
||||
|
||||
version = [2, 22, 4]
|
||||
version = [2, 23]
|
||||
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__), '..'))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user