Really love the work you are doing with this repo. This is by far the best OS tool for lip sync.
When I run this on my Hugging Face Space, this is what the error in the logs show:
2024-06-14 16:57:38.538093: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F AVX512_VNNI FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-06-14 16:57:38.682309: I tensorflow/core/util/util.cc:169] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0.
2024-06-14 16:57:38.689257: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/user/.pyenv/versions/3.10.14/lib/python3.10/site-packages/cv2/../../lib64:
2024-06-14 16:57:38.689283: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2024-06-14 16:57:38.722847: E tensorflow/stream_executor/cuda/cuda_blas.cc:2981] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-06-14 16:57:39.492782: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/user/.pyenv/versions/3.10.14/lib/python3.10/site-packages/cv2/../../lib64:
2024-06-14 16:57:39.492930: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/user/.pyenv/versions/3.10.14/lib/python3.10/site-packages/cv2/../../lib64:
2024-06-14 16:57:39.492947: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
extracting frames from video: /tmp/gradio/e0f0f22fd57f2316890eab0ee07fcdf2fa100e1f/whistleblower.mp4
Traceback (most recent call last):
File "/home/user/app/inference.py", line 88, in
video_size = extract_frames_from_video(opt.source_video_path, video_frame_dir)
File "/home/user/app/inference.py", line 51, in extract_frames_from_video
cv2.imwrite(result_path, frame)
cv2.error: OpenCV(4.10.0) /io/opencv/modules/imgcodecs/src/loadsave.cpp:798: error: (-215:Assertion failed) !_img.empty() in function 'imwrite'
An error occurred: Command '['python', 'inference.py', '--source_video_path', '/tmp/gradio/e0f0f22fd57f2316890eab0ee07fcdf2fa100e1f/whistleblower.mp4', '--driving_audio_path', '/tmp/gradio/7c956915b2484e2b1309eedd152dbda3a56faab1/elevenlabs.wav', '--pretrained_lipsick_path', './asserts/pretrained_lipsick.pth', '--deepspeech_model_path', './asserts/output_graph.pb', '--res_video_dir', './asserts/inference_result']' returned non-zero exit status 1.
Really love the work you are doing with this repo. This is by far the best OS tool for lip sync.
When I run this on my Hugging Face Space, this is what the error in the logs show:
2024-06-14 16:57:38.538093: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX512F AVX512_VNNI FMA To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2024-06-14 16:57:38.682309: I tensorflow/core/util/util.cc:169] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable
video_size = extract_frames_from_video(opt.source_video_path, video_frame_dir)
File "/home/user/app/inference.py", line 51, in extract_frames_from_video
cv2.imwrite(result_path, frame)
cv2.error: OpenCV(4.10.0) /io/opencv/modules/imgcodecs/src/loadsave.cpp:798: error: (-215:Assertion failed) !_img.empty() in function 'imwrite'
TF_ENABLE_ONEDNN_OPTS=0
. 2024-06-14 16:57:38.689257: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/user/.pyenv/versions/3.10.14/lib/python3.10/site-packages/cv2/../../lib64: 2024-06-14 16:57:38.689283: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. 2024-06-14 16:57:38.722847: E tensorflow/stream_executor/cuda/cuda_blas.cc:2981] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered 2024-06-14 16:57:39.492782: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/user/.pyenv/versions/3.10.14/lib/python3.10/site-packages/cv2/../../lib64: 2024-06-14 16:57:39.492930: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/user/.pyenv/versions/3.10.14/lib/python3.10/site-packages/cv2/../../lib64: 2024-06-14 16:57:39.492947: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly. extracting frames from video: /tmp/gradio/e0f0f22fd57f2316890eab0ee07fcdf2fa100e1f/whistleblower.mp4 Traceback (most recent call last): File "/home/user/app/inference.py", line 88, inAn error occurred: Command '['python', 'inference.py', '--source_video_path', '/tmp/gradio/e0f0f22fd57f2316890eab0ee07fcdf2fa100e1f/whistleblower.mp4', '--driving_audio_path', '/tmp/gradio/7c956915b2484e2b1309eedd152dbda3a56faab1/elevenlabs.wav', '--pretrained_lipsick_path', './asserts/pretrained_lipsick.pth', '--deepspeech_model_path', './asserts/output_graph.pb', '--res_video_dir', './asserts/inference_result']' returned non-zero exit status 1.