diff --git a/glob/manager_core.py b/glob/manager_core.py index c77da09e..5781d0df 100644 --- a/glob/manager_core.py +++ b/glob/manager_core.py @@ -41,7 +41,7 @@ import manager_downloader from node_package import InstalledNodePackage -version_code = [3, 6, 4] +version_code = [3, 6, 5] version_str = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '') diff --git a/prestartup_script.py b/prestartup_script.py index 9c8d63c2..731ff004 100644 --- a/prestartup_script.py +++ b/prestartup_script.py @@ -17,9 +17,19 @@ import security_check import manager_util import cm_global import manager_downloader -from datetime import datetime import folder_paths +try: + from datetime import datetime + def current_timestamp(): + return datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')[:-3] +except: + import time + import datetime + logging.error(f"[ComfyUI-Manager] fallback timestamp mode\n datetime module is invalid: '{datetime.__file__}'") + def current_timestamp(): + return str(time.time()).split('.')[0] + security_check.security_check() cm_global.pip_blacklist = ['torch', 'torchsde', 'torchvision'] @@ -235,7 +245,7 @@ try: def sync_write(self, message, file_only=False): with log_lock: - timestamp = datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')[:-3] + timestamp = current_timestamp() if self.last_char != '\n': log_file.write(message) else: @@ -339,7 +349,7 @@ except: print("## [ERROR] ComfyUI-Manager: GitPython package seems to be installed, but failed to load somehow. Make sure you have a working git client installed") -print("** ComfyUI startup time:", datetime.now()) +print("** ComfyUI startup time:", current_timestamp()) print("** Platform:", platform.system()) print("** Python version:", sys.version) print("** Python executable:", sys.executable) diff --git a/pyproject.toml b/pyproject.toml index 76d916b8..73280443 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-manager" description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI." -version = "3.6.4" +version = "3.6.5" license = { file = "LICENSE.txt" } dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions"]