mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-11 06:40:48 +08:00
Complete moving all preprocessor nodes to custom_nodes
This commit is contained in:
parent
c1ef4fff7d
commit
e35f293621
@ -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
|
from annotator.util import HWC3
|
||||||
import torch
|
import torch
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@ -116,7 +116,7 @@ class UniformerPreprocessor:
|
|||||||
image = img_np_to_tensor(HWC3(image))
|
image = img_np_to_tensor(HWC3(image))
|
||||||
return (image,)
|
return (image,)
|
||||||
|
|
||||||
NODE_CLASS_MAPPING = {
|
NODE_CLASS_MAPPINGS = {
|
||||||
"CannyPreprocessor": CannyPreprocessor,
|
"CannyPreprocessor": CannyPreprocessor,
|
||||||
"HEDPreprocessor": HEDPreprocessor,
|
"HEDPreprocessor": HEDPreprocessor,
|
||||||
"DepthPreprocessor": MIDASPreprocessor,
|
"DepthPreprocessor": MIDASPreprocessor,
|
||||||
|
|||||||
4
nodes.py
4
nodes.py
@ -753,7 +753,9 @@ def load_custom_nodes():
|
|||||||
possible_modules = os.listdir(CUSTOM_NODE_PATH)
|
possible_modules = os.listdir(CUSTOM_NODE_PATH)
|
||||||
if "__pycache__" in possible_modules:
|
if "__pycache__" in possible_modules:
|
||||||
possible_modules.remove("__pycache__")
|
possible_modules.remove("__pycache__")
|
||||||
|
if ".ipynb_checkpoints" in possible_modules:
|
||||||
|
possible_modules.remove(".ipynb_checkpoints")
|
||||||
|
|
||||||
for possible_module in possible_modules:
|
for possible_module in possible_modules:
|
||||||
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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user