Skip to content

Media Pipe input error. Image input crashes on all nodes except default image load. #11

Description

@firespark81

Same issue as I was having with your base media pipe nodes. It will not accept input from any node that is not the default image load node.

Here is the node I have plugged into it but I have tried many. Same error every time.

Image

If you need more info just let me know what you need. I'll do my best to provide it.

ComfyUI Error Report

Error Details

  • Node ID: 247
  • Node Type: MediaPipeHandLandmarkerNode
  • Exception Type: TypeError
  • Exception Message: init(): incompatible constructor arguments. The following argument types are supported:
    1. mediapipe.python._framework_bindings.image.Image(image_format: mediapipe::ImageFormat_Format, data: numpy.ndarray[numpy.uint8])
    2. mediapipe.python._framework_bindings.image.Image(image_format: mediapipe::ImageFormat_Format, data: numpy.ndarray[numpy.uint16])
    3. mediapipe.python._framework_bindings.image.Image(image_format: mediapipe::ImageFormat_Format, data: numpy.ndarray[numpy.float32])

Invoked with: kwargs: image_format=<ImageFormat.SRGB: 1>, data=array([[[ 21, 23, 18],
[ 22, 25, 21],
[ 22, 25, 19],
...,
[ 84, 100, 51],
[ 66, 80, 31],
[ 60, 75, 32]],

   [[ 23,  25,  20],
    [ 22,  24,  21],
    [ 23,  25,  22],
    ...,
    [ 70,  91,  45],
    [ 67,  89,  38],
    [ 48,  71,  28]],

   [[ 21,  23,  19],
    [ 23,  25,  21],
    [ 23,  25,  22],
    ...,
    [ 59,  81,  41],
    [ 67,  94,  48],
    [ 44,  59,  28]],

   ...,

   [[ 59,  53,  37],
    [ 52,  49,  33],
    [ 49,  45,  29],
    ...,
    [ 48,  52,  38],
    [ 45,  51,  38],
    [ 45,  50,  40]],

   [[ 54,  51,  34],
    [ 48,  45,  30],
    [ 55,  51,  34],
    ...,
    [ 50,  56,  44],
    [ 47,  54,  44],
    [ 54,  61,  48]],

   [[ 58,  58,  40],
    [ 52,  51,  37],
    [ 55,  52,  37],
    ...,
    [ 64,  70,  54],
    [ 64,  70,  58],
    [ 63,  72,  54]]], dtype=uint8)

Stack Trace

  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 327, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 202, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 174, in _map_node_over_list
    process_inputs(input_dict, i)

  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 163, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_realtimenodes\node_wrappers\mediapipe_vision\hand\landmark\hand_landmark.py", line 62, in detect
    hand_landmarks_batch = detector.detect(
                           ^^^^^^^^^^^^^^^^

  File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_realtimenodes\src\mediapipe_vision\hand_landmark\detector.py", line 93, in detect
    mp_image = mp.Image(image_format=mp.ImageFormat.SRGB, data=np_image)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions