BadToBest / EchoMimic

Lifelike Audio-Driven Portrait Animations through Editable Landmark Conditioning
https://badtobest.github.io/echomimic.html
Apache License 2.0
2.26k stars 263 forks source link

启动webgui.py,上传图片和音频后报错 #90

Open hjj-lmx opened 1 month ago

hjj-lmx commented 1 month ago

Traceback (most recent call last): File "D:\Program Files\miniconda3\envs\echomimic\lib\site-packages\gradio\queueing.py", line 536, in process_events response = await route_utils.call_process_api( File "D:\Program Files\miniconda3\envs\echomimic\lib\site-packages\gradio\route_utils.py", line 276, in call_process_api output = await app.get_blocks().process_api( File "D:\Program Files\miniconda3\envs\echomimic\lib\site-packages\gradio\blocks.py", line 1923, in process_api result = await self.call_function( File "D:\Program Files\miniconda3\envs\echomimic\lib\site-packages\gradio\blocks.py", line 1508, in call_function prediction = await anyio.to_thread.run_sync( # type: ignore File "D:\Program Files\miniconda3\envs\echomimic\lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( File "D:\Program Files\miniconda3\envs\echomimic\lib\site-packages\anyio_backends_asyncio.py", line 2177, in run_sync_in_worker_thread return await future File "D:\Program Files\miniconda3\envs\echomimic\lib\site-packages\anyio_backends_asyncio.py", line 859, in run result = context.run(func, args) File "D:\Program Files\miniconda3\envs\echomimic\lib\site-packages\gradio\utils.py", line 818, in wrapper response = f(args, **kwargs) File "webgui.py", line 233, in generate_video final_output_path = process_video( File "webgui.py", line 169, in process_video face_img = cv2.resize(face_img, (width, height)) cv2.error: OpenCV(4.10.0) :-1: error: (-5:Bad argument) in function 'resize'

Overload resolution failed:

  • src is not a numerical tuple
  • Expected Ptr for argument 'src'
JimmyMa99 commented 1 month ago

相同问题,等回复

Taiwan1912 commented 1 month ago

我也有碰到這個,目前只能不使用webgui.py,用CMD視窗的命令去運行它

do-one-thing-to-well commented 1 month ago

+1报错,不知道是不是python版本的问题,我是3.10,,看README,建议使用3.8是吧。

oisilener1982 commented 1 month ago

same problem. It was working fine until I updated to the latest version

oisilener1982 commented 1 month ago

+1 Error,I don't know if it's a python version problem.,I'm 3.10,,Look at README,It's recommended to use 3.8..,It's right.。

This was tested in 3.10

Python Environment Setup Tested System Environment: Centos 7.2/Ubuntu 22.04, Cuda >= 11.7 Tested GPUs: A100(80G) / RTX4090D (24G) / V100(16G) Tested Python Version: 3.8 / 3.10 / 3.11

beierjie39 commented 1 month ago

同样问题+1

oisilener1982 commented 1 month ago

We need @greengerong @Robin021 and @O-O1024. Please help us have a working gradio for echomimic

CCmahua commented 1 month ago

process_video函数下的

face_img = crop_and_pad(face_img, crop_rect)
face_mask = crop_and_pad(face_mask, crop_rect)

改为

face_img,crop_rect = crop_and_pad(face_img, crop_rect)
face_mask,crop_rect = crop_and_pad(face_mask, crop_rect)
oisilener1982 commented 1 month ago

Thanks its working. Is there a way to make the webgui.py to use the accelerated version as the default? It works but not accelerated

nitinmukesh commented 1 month ago

@oisilener1982 @do-one-thing-to-well @beierjie39

Attached file working for me. Please confirm if it is working for you and the changes can be merged in repo.

image

Command python -u webgui_a2v_acc.py --server_port=3000

Download and extract in the installation folder webgui_a2v_acc.zip

oisilener1982 commented 1 month ago

Capture cv2.error: OpenCV(4.10.0) :-1: error: (-5:Bad argument) in function 'resize'

Overload resolution failed:

  • src is not a numerical tuple
  • Expected Ptr for argument 'src'
oisilener1982 commented 1 month ago

The uploaded file gives error. I dont understand how you got 6 steps if the steps in webgui_a2v_acc is 30

I dont know if i am doing this right. Here is what i have done

  1. Install based on the tutorial
  2. Cloned https://github.com/BadToBest/EchoMimic to another folder. Copy and paste all the files to the installation folder then replace all. This is to update to the latest version
  3. Download webgui_a2v_acc.zip and extract to installation folder
  4. Modify the .bat launcher to REM Launch WebUI python -u webgui_a2v_acc.py --server_port=3000

I tried to fix with the solution below and it works with no error but i still got 30 steps face_img,crop_rect = crop_and_pad(face_img, crop_rect) face_mask,crop_rect = crop_and_pad(face_mask, crop_rect)

CCmahua commented 1 month ago

webgui.zip 尝试下我这个版本,我已经使用了acc模型和解决error: (-5:Bad argument) in function 'resize'问题。

修改细节如下:

关于步骤为6和30的问题,请修改default_values中的steps。

然后

face_img,crop_rect = crop_and_pad(face_img, crop_rect)
face_mask,crop_rect = crop_and_pad(face_mask, crop_rect)

修改为

face_img,_ = crop_and_pad(face_img, crop_rect)
face_mask,_ = crop_and_pad(face_mask, crop_rect)

from src.pipelines.pipeline_echo_mimic import Audio2VideoPipeline

修改为

from src.pipelines.pipeline_echo_mimic_acc import Audio2VideoPipeline

config_path = "./configs/prompts/animation.yaml"

修改为

config_path = "./configs/prompts/animation_acc.yaml"

oisilener1982 commented 1 month ago

can anyone confirm that the accelerated version has lower quality? Even if i try to increase the number of steps from 6 to 30 it still have lower quality than the original/older version of echomimic

I guess i will just have to stay with the Slow version. The Old is slow but has better quality

xiaofanku commented 3 weeks ago

cuda版本有要求吗?目前12.1报错了: Torch not compiled with CUDA enabled

panmyuan commented 3 weeks ago

image image 有人碰到这个问题不

ciscogeek commented 3 weeks ago

Same issue. watch this.

13140438775 commented 3 weeks ago

修改细节如下:

关于步骤为6和30的问题,请修改default_values中的steps。

然后

face_img,crop_rect = crop_and_pad(face_img, crop_rect)

这个方案是可以的。