diff --git a/custom_nodes/annotator/__init__.py b/custom_nodes/annotator/__init__.py index c08dd6e2d..1e97dde58 100644 --- a/custom_nodes/annotator/__init__.py +++ b/custom_nodes/annotator/__init__.py @@ -1,5 +1,5 @@ -import canny, hed, midas, mlsd, openpose, uniformer -from util import HWC3 +from custom_node_module.annotator import canny, hed, midas, mlsd, openpose, uniformer +from annotator.util import HWC3 import torch import numpy as np diff --git a/nodes.py b/nodes.py index bbf2c36fe..bca8dd5a4 100644 --- a/nodes.py +++ b/nodes.py @@ -758,7 +758,7 @@ def load_custom_nodes(): 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 - module_name = "custom_node_module.{}".format(possible_module) + module_name = os.path.basename(module_path) try: if os.path.isfile(module_path): module_spec = importlib.util.spec_from_file_location(module_name, module_path)