Rudrabha / Wav2Lip

This repository contains the codes of "A Lip Sync Expert Is All You Need for Speech to Lip Generation In the Wild", published at ACM Multimedia 2020. For HD commercial model, please try out Sync Labs
https://synclabs.so
10.18k stars 2.19k forks source link

Information.py problem error raise RuntimeError('Image too big to run face detection on GPU. Please use the --resize_factor argument') #259

Closed wowopc closed 3 years ago

wowopc commented 3 years ago

function python3 inference.py --checkpoint_path color_sync/checkpoint_step000030000.pth --face DVD/1.PNG --audio DVD/2.wav I add HD network 192 settings, which is why 192 has this error

Traceback (most recent call last): File "inference.py", line 78, in face_detect predictions.extend(detector.get_detections_for_batch(np.array(images[i:i + batch_size]))) File "/home/mist/Wav2Lip-master/face_detection/api.py", line 66, in get_detections_for_batch detected_faces = self.face_detector.detect_from_batch(images.copy()) File "/home/mist/Wav2Lip-master/face_detection/detection/sfd/sfd_detector.py", line 42, in detect_from_batch bboxlists = batch_detect(self.face_detector, images, device=self.device) File "/home/mist/Wav2Lip-master/face_detection/detection/sfd/detect.py", line 68, in batch_detect olist = net(imgs) File "/mistgpu/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, *kwargs) File "/home/mist/Wav2Lip-master/face_detection/detection/sfd/net_s3fd.py", line 71, in forward h = F.relu(self.conv1_1(x)) File "/mistgpu/site-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(input, **kwargs) File "/mistgpu/site-packages/torch/nn/modules/conv.py", line 423, in forward return self._conv_forward(input, self.weight) File "/mistgpu/site-packages/torch/nn/modules/conv.py", line 420, in _conv_forward self.padding, self.dilation, self.groups) RuntimeError: CUDA error: no kernel image is available for execution on the device

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "inference.py", line 280, in main() File "inference.py", line 250, in main total=int(np.ceil(float(len(mel_chunks))/batch_size)))): File "/mistgpu/site-packages/tqdm/std.py", line 1127, in iter for obj in iterable: File "inference.py", line 113, in datagen face_det_results = face_detect(frames) # BGR2RGB for CNN face detection File "inference.py", line 81, in face_detect raise RuntimeError('Image too big to run face detection on GPU. Please use the --resize_factor argument') RuntimeError: Image too big to run face detection on GPU. Please use the --resize_factor argument

Rudrabha commented 3 years ago

Please resize the image before feeding it to Wav2Lip.