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

more than one face in video #27

Open
Kruchemundo opened this issue Jul 18, 2024 · 0 comments
Open

more than one face in video #27

Kruchemundo opened this issue Jul 18, 2024 · 0 comments

Comments

@Kruchemundo
Copy link

When using Live Portrait for video and have more than one face in "source_image_batch" can not set other order than large to small. I'm getting this message :
"More than one face detected in the image, only pick one face by rule large-small. cropper.py:139
Load from video file"
If I try to put Face Crop Info getting Error:
"Error occurred when executing FaceCropInfo:

Cannot handle this data type: (1, 1, 1920, 3), |u1

File "c:\AI_programs\Comfyui\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\AI_programs\Comfyui\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 "c:\AI_programs\Comfyui\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\AI_programs\Comfyui\ComfyUI\custom_nodes\comfyui-liveportrait\nodes\live_portrait.py", line 206, in run
pil_image=tensor2pil(source_image)
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\AI_programs\Comfyui\ComfyUI\custom_nodes\comfyui-liveportrait\nodes\live_portrait.py", line 24, in tensor2pil
return Image.fromarray(np.clip(255. * image.cpu().numpy().squeeze(), 0, 255).astype(np.uint8))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\AI_programs\Comfyui\python_embeded\Lib\site-packages\PIL\Image.py", line 3281, in fromarray
raise TypeError(msg) from e"
Is there other way to do it?
Thank you for your time.

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

1 participant