Revert "Merge branch 'main' of https://github.com/daxcay/ComfyUI-Manager"
This reverts commit16fcb3a7b1, reversing changes made tobb7b13c1f5.
This commit is contained in:
@@ -15,9 +15,6 @@ sys.path.append(glob_path)
|
||||
import cm_global
|
||||
|
||||
|
||||
cm_global.pip_downgrade_blacklist = ['torch', 'torchsde', 'torchvision', 'transformers', 'safetensors', 'kornia']
|
||||
|
||||
|
||||
def skip_pip_spam(x):
|
||||
return 'Requirement already satisfied:' in x
|
||||
|
||||
@@ -173,9 +170,11 @@ try:
|
||||
write_stderr = wrapper_stderr
|
||||
|
||||
pat_tqdm = r'\d+%.*\[(.*?)\]'
|
||||
pat_import_fail = r'seconds \(IMPORT FAILED\):.*[/\\]custom_nodes[/\\](.*)$'
|
||||
pat_import_fail = r'seconds \(IMPORT FAILED\):'
|
||||
pat_custom_node = r'[/\\]custom_nodes[/\\](.*)$'
|
||||
|
||||
is_start_mode = True
|
||||
is_import_fail_mode = False
|
||||
|
||||
class ComfyUIManagerLogger:
|
||||
def __init__(self, is_stdout):
|
||||
@@ -195,17 +194,26 @@ try:
|
||||
|
||||
def write(self, message):
|
||||
global is_start_mode
|
||||
global is_import_fail_mode
|
||||
|
||||
if any(f(message) for f in message_collapses):
|
||||
return
|
||||
|
||||
if is_start_mode:
|
||||
match = re.search(pat_import_fail, message)
|
||||
if match:
|
||||
import_failed_extensions.add(match.group(1))
|
||||
if is_import_fail_mode:
|
||||
match = re.search(pat_custom_node, message)
|
||||
if match:
|
||||
import_failed_extensions.add(match.group(1))
|
||||
is_import_fail_mode = False
|
||||
else:
|
||||
match = re.search(pat_import_fail, message)
|
||||
if match:
|
||||
is_import_fail_mode = True
|
||||
else:
|
||||
is_import_fail_mode = False
|
||||
|
||||
if 'Starting server' in message:
|
||||
is_start_mode = False
|
||||
if 'Starting server' in message:
|
||||
is_start_mode = False
|
||||
|
||||
if not self.is_stdout:
|
||||
match = re.search(pat_tqdm, message)
|
||||
@@ -342,12 +350,7 @@ def is_installed(name):
|
||||
|
||||
if match:
|
||||
name = match.group(1)
|
||||
|
||||
if name in cm_global.pip_downgrade_blacklist:
|
||||
if match is None or match.group(2) in ['<=', '==', '<']:
|
||||
print(f"[ComfyUI-Manager] skip black listed pip installation: '{name}'")
|
||||
return True
|
||||
|
||||
|
||||
return name.lower() in get_installed_packages()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user