From dd1f7b6183d0afae78eadb1290cdb57eed8422ca Mon Sep 17 00:00:00 2001 From: doctorpangloss <@hiddenswitch.com> Date: Thu, 22 Feb 2024 20:05:48 -0800 Subject: [PATCH] Adapt to more custom nodes specifications --- comfy/cli_args_types.py | 2 ++ comfy/nodes/package.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/comfy/cli_args_types.py b/comfy/cli_args_types.py index efbca8ed6..ef467ee7d 100644 --- a/comfy/cli_args_types.py +++ b/comfy/cli_args_types.py @@ -146,6 +146,8 @@ class Configuration(dict): self[key] = value def __getattr__(self, item): + if item not in self: + return None return self[item] def __setattr__(self, key, value): diff --git a/comfy/nodes/package.py b/comfy/nodes/package.py index adabc8392..ed971d765 100644 --- a/comfy/nodes/package.py +++ b/comfy/nodes/package.py @@ -64,6 +64,10 @@ def _import_and_enumerate_nodes_in_module(module: types.ModuleType, print_import except KeyboardInterrupt as interrupted: raise interrupted except Exception as x: + if isinstance(x, AttributeError): + potential_path_error: AttributeError = x + if potential_path_error.name == '__path__': + continue logging.error(f"{full_name} import failed", exc_info=x) success = False timings.append((time.perf_counter() - time_before, full_name, success))