From e35f29362147e48b7b5f622b3de9996bc3b70258 Mon Sep 17 00:00:00 2001 From: Hacker 17082006 Date: Sun, 19 Feb 2023 20:38:39 +0700 Subject: [PATCH] Complete moving all preprocessor nodes to custom_nodes --- custom_nodes/annotator/__init__.py | 4 ++-- nodes.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/custom_nodes/annotator/__init__.py b/custom_nodes/annotator/__init__.py index 1e97dde58..2fe453d62 100644 --- a/custom_nodes/annotator/__init__.py +++ b/custom_nodes/annotator/__init__.py @@ -1,4 +1,4 @@ -from custom_node_module.annotator import canny, hed, midas, mlsd, openpose, uniformer +from annotator import canny, hed, midas, mlsd, openpose, uniformer from annotator.util import HWC3 import torch import numpy as np @@ -116,7 +116,7 @@ class UniformerPreprocessor: image = img_np_to_tensor(HWC3(image)) return (image,) -NODE_CLASS_MAPPING = { +NODE_CLASS_MAPPINGS = { "CannyPreprocessor": CannyPreprocessor, "HEDPreprocessor": HEDPreprocessor, "DepthPreprocessor": MIDASPreprocessor, diff --git a/nodes.py b/nodes.py index bca8dd5a4..80c3ab4b3 100644 --- a/nodes.py +++ b/nodes.py @@ -753,7 +753,9 @@ def load_custom_nodes(): possible_modules = os.listdir(CUSTOM_NODE_PATH) if "__pycache__" in possible_modules: possible_modules.remove("__pycache__") - + if ".ipynb_checkpoints" in possible_modules: + possible_modules.remove(".ipynb_checkpoints") + for possible_module in possible_modules: 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