mirror of
https://git.datalinker.icu/ltdrdata/ComfyUI-Manager
synced 2025-12-15 00:54:23 +08:00
fix: invalid detection of failed import - reflect changed ComfyUI log system
https://github.com/ltdrdata/ComfyUI-Manager/issues/480
This commit is contained in:
parent
b7e57b9b9d
commit
bb440a4d2d
@ -29,7 +29,7 @@ except:
|
|||||||
print(f"[WARN] ComfyUI-Manager: Your ComfyUI version is outdated. Please update to the latest version.")
|
print(f"[WARN] ComfyUI-Manager: Your ComfyUI version is outdated. Please update to the latest version.")
|
||||||
|
|
||||||
|
|
||||||
version = [2, 10]
|
version = [2, 10, 1]
|
||||||
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 '')
|
||||||
print(f"### Loading: ComfyUI-Manager ({version_str})")
|
print(f"### Loading: ComfyUI-Manager ({version_str})")
|
||||||
|
|
||||||
|
|||||||
@ -173,11 +173,9 @@ try:
|
|||||||
write_stderr = wrapper_stderr
|
write_stderr = wrapper_stderr
|
||||||
|
|
||||||
pat_tqdm = r'\d+%.*\[(.*?)\]'
|
pat_tqdm = r'\d+%.*\[(.*?)\]'
|
||||||
pat_import_fail = r'seconds \(IMPORT FAILED\):'
|
pat_import_fail = r'seconds \(IMPORT FAILED\):.*[/\\]custom_nodes[/\\](.*)$'
|
||||||
pat_custom_node = r'[/\\]custom_nodes[/\\](.*)$'
|
|
||||||
|
|
||||||
is_start_mode = True
|
is_start_mode = True
|
||||||
is_import_fail_mode = False
|
|
||||||
|
|
||||||
class ComfyUIManagerLogger:
|
class ComfyUIManagerLogger:
|
||||||
def __init__(self, is_stdout):
|
def __init__(self, is_stdout):
|
||||||
@ -197,23 +195,14 @@ try:
|
|||||||
|
|
||||||
def write(self, message):
|
def write(self, message):
|
||||||
global is_start_mode
|
global is_start_mode
|
||||||
global is_import_fail_mode
|
|
||||||
|
|
||||||
if any(f(message) for f in message_collapses):
|
if any(f(message) for f in message_collapses):
|
||||||
return
|
return
|
||||||
|
|
||||||
if is_start_mode:
|
if is_start_mode:
|
||||||
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)
|
match = re.search(pat_import_fail, message)
|
||||||
if match:
|
if match:
|
||||||
is_import_fail_mode = True
|
import_failed_extensions.add(match.group(1))
|
||||||
else:
|
|
||||||
is_import_fail_mode = False
|
|
||||||
|
|
||||||
if 'Starting server' in message:
|
if 'Starting server' in message:
|
||||||
is_start_mode = False
|
is_start_mode = False
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user