Fix for relative imports in custom nodes.

This commit is contained in:
comfyanonymous 2023-02-19 12:00:05 -05:00
parent 137ae2606c
commit a3d0b56c61
1 changed files with 1 additions and 1 deletions

View File

@ -759,7 +759,7 @@ def load_custom_nodes():
module_path = os.path.join(CUSTOM_NODE_PATH, possible_module) module_path = os.path.join(CUSTOM_NODE_PATH, possible_module)
if os.path.isfile(module_path) and os.path.splitext(module_path)[1] != ".py": continue if os.path.isfile(module_path) and os.path.splitext(module_path)[1] != ".py": continue
module_name = "custom_node_module.{}".format(possible_module) module_name = possible_module
try: try:
if os.path.isfile(module_path): if os.path.isfile(module_path):
module_spec = importlib.util.spec_from_file_location(module_name, module_path) module_spec = importlib.util.spec_from_file_location(module_name, module_path)