From e0b762baca41eb913eca50d9016ddc0f34ab7160 Mon Sep 17 00:00:00 2001 From: "dr.lt.data" Date: Tue, 2 Jan 2024 18:23:18 +0900 Subject: [PATCH] fix: robust cm_global --- __init__.py | 16 ++++++++++------ prestartup_script.py | 1 - 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/__init__.py b/__init__.py index 9cc8c46..df50e07 100644 --- a/__init__.py +++ b/__init__.py @@ -8,22 +8,26 @@ import os import sys import threading import datetime -import re import locale import subprocess # don't remove this from tqdm.auto import tqdm import concurrent -import ssl from urllib.parse import urlparse import http.client import re -import signal import nodes -import torch -import cm_global + +try: + import cm_global +except: + glob_path = os.path.join(os.path.dirname(__file__), "glob") + sys.path.append(glob_path) + import cm_global + + print(f"[WARN] ComfyUI-Manager: Your ComfyUI version is outdated. Please update to the latest version.") -version = [1, 19] +version = [1, 19, 1] version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '') print(f"### Loading: ComfyUI-Manager ({version_str})") diff --git a/prestartup_script.py b/prestartup_script.py index d600f34..5869237 100644 --- a/prestartup_script.py +++ b/prestartup_script.py @@ -7,7 +7,6 @@ import threading import re import locale import platform -import traceback glob_path = os.path.join(os.path.dirname(__file__), "glob")