Skip to content
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

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() #112

Open
liubin79813 opened this issue Dec 9, 2024 · 3 comments

Comments

@liubin79813
Copy link

视频转视频出现问题,如下,请问大佬,这是什么问题?

got prompt
Failed to validate prompt for output 17:

  • LoadAudio 4:
    • Custom validation failed for node: audio - Invalid audio file: echomimicv2_woman.wav
      Output will be ignored
      invalid prompt: {'type': 'prompt_outputs_failed_validation', 'message': 'Prompt outputs failed validation', 'details': '', 'extra_info': {}}
      got prompt
      ****** refer in EchoMimic V2 mode!******
      loaded temporal unet's pretrained weights from E:\ComfyUI_Mie_V3.0\ComfyUI_Mie_3.0\ComfyUI_Mie_V3.0\ComfyUI\models\echo_mimic\unet ...
      Load motion module params from E:\ComfyUI_Mie_V3.0\ComfyUI_Mie_3.0\ComfyUI_Mie_V3.0\ComfyUI\models\echo_mimic\v2\motion_module.pth
      Loaded 453.20928M-parameter motion module
      ***** start infer video to npy files for drive pose ! *****

0: 640x640 1 person, 18.0ms
Speed: 4.0ms preprocess, 18.0ms inference, 49.6ms postprocess per image at shape (1, 3, 640, 640)
!!! Exception during processing !!! The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Traceback (most recent call last):
File "E:\ComfyUI_Mie_V3.0\ComfyUI_Mie_3.0\ComfyUI_Mie_V3.0\ComfyUI\execution.py", line 324, 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 "E:\ComfyUI_Mie_V3.0\ComfyUI_Mie_3.0\ComfyUI_Mie_V3.0\ComfyUI\execution.py", line 199, 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 "E:\ComfyUI_Mie_V3.0\ComfyUI_Mie_3.0\ComfyUI_Mie_V3.0\ComfyUI\execution.py", line 170, in _map_node_over_list
process_inputs(input_dict, i)
File "E:\ComfyUI_Mie_V3.0\ComfyUI_Mie_3.0\ComfyUI_Mie_V3.0\ComfyUI\execution.py", line 159, in process_inputs
results.append(getattr(obj, func)(**inputs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_Mie_V3.0\ComfyUI_Mie_3.0\ComfyUI_Mie_V3.0\ComfyUI\custom_nodes\ComfyUI_EchoMimic\EchoMimic_node.py", line 463, in em_main
output_video=process_video_v2(image, audio_file, width, height, length, seed,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_Mie_V3.0\ComfyUI_Mie_3.0\ComfyUI_Mie_V3.0\ComfyUI\custom_nodes\ComfyUI_EchoMimic\utils.py", line 65, in process_video_v2
_, first_key, first_box_xy = visualizer(np.asarray(input_frames_cv2[0]),None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_Mie_V3.0\ComfyUI_Mie_3.0\ComfyUI_Mie_V3.0\ComfyUI\custom_nodes\ComfyUI_EchoMimic\src\pose.py", line 105, in call
if not bboxes:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Prompt executed in 27.92 seconds

@carlloos
Copy link

carlloos commented Dec 9, 2024

Facing the same problem here, any help will be appreciated

@smthemex
Copy link
Owner

yolo未检测到视频里有人物时,导致box无法绘制的bug,我将很快修复它,换而言之,你的视频里有空帧或者跳帧,检测不到人体

YOLO did not detect any characters in the video, which caused the box to fail to draw. I will fix it soon,In other words, if there are empty or skipped frames in your video, the human body cannot be detected

@liubin79813
Copy link
Author

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants