mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-11 14:50:49 +08:00
Change module_name var in nodes.py since it can make local module import in module folder dont work
This commit is contained in:
parent
841345ce46
commit
c1ef4fff7d
@ -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
|
||||
|
||||
|
||||
2
nodes.py
2
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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user