-
Notifications
You must be signed in to change notification settings - Fork 31
ComfyUI/Comfyui_Anyline Import Failed No module named 'custom_nodes.comfyui_controlnet_aux.src.controlnet_aux' #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This problem occurred after I updated comfyui. After rolling back the version, the problem still persisted. I tried reinstalling in various ways, but it couldn't be solved. File "C:\Users\Administrator\Desktop\ComfyUI-V1.3\custom_nodes\ComfyUI-Anyline_init_.py", line 1, in Cannot import C:\Users\Administrator\Desktop\ComfyUI-V1.3\custom_nodes\ComfyUI-Anyline module for custom nodes: No module named 'custom_nodes.comfyui_controlnet_aux' |
Temporary solution is to get back to a commit before renaming controlnet_aux core module
|
In the c47ccab version,comfyui-controlnet-aux Rename core module src.controlnet_aux to src.custom_controlnet_aux to avoid conflict with HuggingFace's controlnet_aux.So modify lines 9/10/11 of code in anyline.py as follows: |
For the people that are skimming this thread this is the solution |
Thz, it works👍 |
@lellotrek install the controlnet auxilliary node. |
您好,请问要怎么修改,电脑小白 |
Updated with these new ones, still not work. |
For some reason it's not getting installed automatically. Install from Manager, or from https://github.com/Fannovel16/comfyui_controlnet_aux |
I modified lines 8-10 to: import os
import sys
custom_nodes_directory = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if custom_nodes_directory not in sys.path:
sys.path.append(custom_nodes_directory)
print("[Debug] Added to sys.path:", custom_nodes_directory)
else:
print("[Debug] Path already in sys.path")
# Requires comfyui_controlnet_aux funcsions and classes
from comfyui_controlnet_aux.utils import common_annotator_call
from comfyui_controlnet_aux.src.controlnet_aux.teed import TEDDetector
from comfyui_controlnet_aux.src.controlnet_aux.teed.ted import TED
from comfyui_controlnet_aux.src.controlnet_aux.lineart_standard import LineartStandardDetector as LineartStandardDetect The issue occurred because: The author didn't add the custom_nodes path to sys.path, causing the script to fail locating the modules Some module import names were incorrect, which might be due to comfyui_controlnet_aux updates changing certain module names This modification should resolve both the path configuration and the updated module reference issues. |
On Mac M2 silicon run ComfyUI
Traceback (most recent call last):
File "/Users/local/ComfyUI/nodes.py", line 1993, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/Users/local/ComfyUI/custom_nodes/ComfyUI-Anyline/init.py", line 1, in
from .anyline import AnyLine
File "/Users/local/ComfyUI/custom_nodes/ComfyUI-Anyline/anyline.py", line 9, in
from custom_nodes.comfyui_controlnet_aux.src.controlnet_aux.teed import TEDDetector
ModuleNotFoundError: No module named 'custom_nodes.comfyui_controlnet_aux.src.controlnet_aux'
Cannot import /Users/local/ComfyUI/custom_nodes/ComfyUI-Anyline module for custom nodes: No module named 'custom_nodes.comfyui_controlnet_aux.src.controlnet_aux'
How to fix it?
The text was updated successfully, but these errors were encountered: