Kedreamix / Linly-Talker

Digital Avatar Conversational System - Linly-Talker. 😄✨ Linly-Talker is an intelligent AI system that combines large language models (LLMs) with visual models to create a novel human-AI interaction method. 🤝🤖 It integrates various technologies like Whisper, Linly, Microsoft Speech Services, and SadTalker talking head generation system. 🌟🔬
https://kedreamix.github.io/
MIT License
1.27k stars 222 forks source link

在数字人文本/语音播报,用视频人物、wav2lip模型,出现Image too big to run face detection on GPU. Please use the resize_factor argument #50

Closed lemwang closed 2 weeks ago

lemwang commented 3 weeks ago

image

Traceback (most recent call last): File "/root/Linly-Talker/TFG/Wav2Lip.py", line 194, in face_detect predictions.extend(detector.get_detections_for_batch(np.array(images[i:i + batch_size]))) File "/root/Linly-Talker/face_detection/api.py", line 66, in get_detections_for_batch detected_faces = self.face_detector.detect_from_batch(images.copy()) File "/root/Linly-Talker/face_detection/detection/sfd/sfd_detector.py", line 42, in detect_from_batch bboxlists = batch_detect(self.face_detector, images, device=self.device) File "/root/Linly-Talker/face_detection/detection/sfd/detect.py", line 59, in batch_detect imgs = imgs - np.array([104, 117, 123]) TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/root/miniconda3/lib/python3.10/site-packages/gradio/queueing.py", line 495, in call_prediction output = await route_utils.call_process_api( File "/root/miniconda3/lib/python3.10/site-packages/gradio/route_utils.py", line 232, in call_process_api output = await app.get_blocks().process_api( File "/root/miniconda3/lib/python3.10/site-packages/gradio/blocks.py", line 1561, in process_api result = await self.call_function( File "/root/miniconda3/lib/python3.10/site-packages/gradio/blocks.py", line 1179, in call_function prediction = await anyio.to_thread.run_sync( File "/root/miniconda3/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( File "/root/miniconda3/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2134, in run_sync_in_worker_thread return await future File "/root/miniconda3/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 851, in run result = context.run(func, args) File "/root/miniconda3/lib/python3.10/site-packages/gradio/utils.py", line 695, in wrapper response = f(args, **kwargs

Kedreamix commented 2 weeks ago

这个报错似乎不是很完整,不过我会看看是什么问题,可能就是图片太大,你看看能不能稍微放小分辨率

Kedreamix commented 2 weeks ago

或者可以修改一部分的代码,在TFG/Wav2Lip.py中调整resize_factor参数,缩放图像来使得分辨率降低 image