comfyui_controlnet_aux: Error: "Message class can only inherit from Message"
I know that this issue also existed in previous version of the extension and i never managed to get it working with methods mentioned earlier, so I’m gonna leave this there.
What I already tried:
- Do Comfy install in a venv
- Clean venv and install everything manually
- Clean install python and reinstall everything
My setup (something might mess things up and that’s why it’s not working):
- Pyenv-win (used to manage python versions)
- venv
- manual ComfyUI install (via git clone)
- manual extension install (via install.bat file)
The error:
Full error log from comfyui_controlnet_aux:
Traceback (most recent call last):
File "C:\AI\ComfyUI\custom_nodes\comfyui_controlnet_aux\__init__.py", line 26, in load_nodes
module = importlib.import_module(
File "C:\Users\janlu\.pyenv\pyenv-win\versions\3.10.11\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\AI\ComfyUI\custom_nodes\comfyui_controlnet_aux\node_wrappers\mediapipe_face.py", line 2, in <module>
from controlnet_aux.mediapipe_face import MediapipeFaceDetector
File "C:\AI\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\controlnet_aux\mediapipe_face\__init__.py", line 9, in <module>
from .mediapipe_face_common import generate_annotation
File "C:\AI\ComfyUI\custom_nodes\comfyui_controlnet_aux\src\controlnet_aux\mediapipe_face\mediapipe_face_common.py", line 5, in <module>
import mediapipe as mp
File "C:\AI\ComfyUI\venv\lib\site-packages\mediapipe\__init__.py", line 16, in <module>
import mediapipe.python.solutions as solutions
File "C:\AI\ComfyUI\venv\lib\site-packages\mediapipe\python\solutions\__init__.py", line 17, in <module>
import mediapipe.python.solutions.drawing_styles
File "C:\AI\ComfyUI\venv\lib\site-packages\mediapipe\python\solutions\drawing_styles.py", line 20, in <module>
from mediapipe.python.solutions.drawing_utils import DrawingSpec
File "C:\AI\ComfyUI\venv\lib\site-packages\mediapipe\python\solutions\drawing_utils.py", line 24, in <module>
from mediapipe.framework.formats import detection_pb2
File "C:\AI\ComfyUI\venv\lib\site-packages\mediapipe\framework\formats\detection_pb2.py", line 14, in <module>
from mediapipe.framework.formats import location_data_pb2 as mediapipe_dot_framework_dot_formats_dot_location__data__pb2
File "C:\AI\ComfyUI\venv\lib\site-packages\mediapipe\framework\formats\location_data_pb2.py", line 14, in <module>
from mediapipe.framework.formats.annotation import rasterization_pb2 as mediapipe_dot_framework_dot_formats_dot_annotation_dot_rasterization__pb2
File "C:\AI\ComfyUI\venv\lib\site-packages\mediapipe\framework\formats\annotation\rasterization_pb2.py", line 20, in <module>
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'mediapipe.framework.formats.annotation.rasterization_pb2', _globals)
File "C:\AI\ComfyUI\venv\lib\site-packages\google\protobuf\internal\builder.py", line 108, in BuildTopDescriptorsAndMessages
module[name] = BuildMessage(msg_des)
File "C:\AI\ComfyUI\venv\lib\site-packages\google\protobuf\internal\builder.py", line 82, in BuildMessage
create_dict[name] = BuildMessage(nested_msg)
File "C:\AI\ComfyUI\venv\lib\site-packages\google\protobuf\internal\builder.py", line 85, in BuildMessage
message_class = _reflection.GeneratedProtocolMessageType(
TypeError: A Message class can only inherit from Message
[comfyui_controlnet_aux] | STATUS -> Some nodes failed to load:
Failed to import module mediapipe_face because TypeError: A Message class can only inherit from Message
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Comments: 15 (5 by maintainers)
Commits related to this issue
- Merge pull request #7 from Layer-norm/dense126 Dense126 — committed to Fannovel16/comfyui_controlnet_aux by Layer-norm 7 months ago
- Downgrade opencv-python to 4.7.0.72 to fix https://github.com/Fannovel16/comfyui_controlnet_aux/issues/7 — committed to ruucm-working/comfyui_controlnet_aux by Fannovel16 9 months ago
Oh good, it works. Just did a quick test on my weak Windows machine but I think this is the case for other platforms.
@Miosp @G-Grifflu I pushed the fix at https://github.com/Fannovel16/comfyui_controlnet_aux/commit/8b7ce6c54b17fd4c809d7b62a449bef0ff210573. Can yall do a git pull?