YanWenKun / ComfyUI-Docker

🐳Dockerfile for 🎨ComfyUI. | 容器镜像与启动脚本
https://hub.docker.com/r/yanwk/comfyui-boot
Other
467 stars 87 forks source link

MeshGraphormer #40

Closed AonoZan closed 4 months ago

AonoZan commented 4 months ago

Error occurs when this node is used:

image

Error occurred when executing MeshGraphormer-DepthMapPreprocessor:

'FieldDescriptor' object has no attribute '_default_constructor'

File "/home/runner/ComfyUI/execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/ComfyUI/execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/ComfyUI/execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/ComfyUI/custom_nodes/comfyui_controlnet_aux/node_wrappers/mesh_graphormer.py", line 68, in execute
else MeshGraphormerDetector.from_pretrained(detect_thr=detect_thr, presence_thr=presence_thr).to(model_management.get_torch_device())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/ComfyUI/custom_nodes/comfyui_controlnet_aux/src/controlnet_aux/mesh_graphormer/__init__.py", line 23, in from_pretrained
pipeline = MeshGraphormerMediapipe(args, detect_thr=detect_thr, presence_thr=presence_thr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/ComfyUI/custom_nodes/comfyui_controlnet_aux/src/controlnet_aux/mesh_graphormer/pipeline.py", line 203, in __init__
self.detector = vision.HandLandmarker.create_from_options(options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.11/site-packages/mediapipe/tasks/python/vision/hand_landmarker.py", line 365, in create_from_options
task_info.generate_graph_config(
File "/usr/lib64/python3.11/site-packages/mediapipe/tasks/python/core/task_info.py", line 97, in generate_graph_config
node_config.options.CopyFrom(task_subgraph_options)
File "/home/runner/.local/lib/python3.11/site-packages/google/protobuf/message.py", line 129, in CopyFrom
self.MergeFrom(other_msg)
File "/home/runner/.local/lib/python3.11/site-packages/google/protobuf/internal/python_message.py", line 1334, in MergeFrom
field_value = field._default_constructor(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^
YanWenKun commented 4 months ago

Updating ControlNet Auxiliary Preprocessors should work. There's a fix recently. https://github.com/Fannovel16/comfyui_controlnet_aux/commit/e2bd235a8ff5b470b1a6ff3eae5a97c0c0941445

Otherwise try:

pip install mediapipe

This will fix MediaPipe's broken dep (protobuf<4).

AonoZan commented 4 months ago

I have updated custom nodes and I also tried installing mediapipe to my system. Stopping, restarting docker image and it didnt solved error.

I have also tried modifying docker file and "2. Fix Mediapipe" lines: && pip uninstall --break-system-packages --yes \ mediapipe protobuf \ && pip install --break-system-packages \ "protobuf>=3.11,<4" mediapipe==0.10.9 This didnt help as well.

YanWenKun commented 4 months ago

I just tested this node in Windows (standalone portable) and Linux (both latest & megapak image). It's working so I'm not sure what causes error.

I suggest updating to the latest Docker image, should fix most dependency issues.

Image for my test:

test-hand

screen

AonoZan commented 4 months ago

I managed to fix this by adding pip installs to "pre-start.sh"

pip install --break-system-packages "protobuf>=3.11,<4" mediapipe==0.10.9

I have also missed part where its stated that pre-start script needs to be in ./storage/scripts.

image