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.79k stars 2.29k forks source link

Windows Permission Error On Reading Checkpoint #238

Closed ThePieMonster closed 3 years ago

ThePieMonster commented 3 years ago

Made sure the file was "Unblocked" and that "Everyone" permission was set to "Modify" for the folder in question.

Command python.exe .\inference.py --checkpoint_path "C:\GIT\Wav2Lip\checkpoints" --face "filename.mp4" --audio "filename.mp3"

Requirements.txt

librosa==0.7.0
numpy==1.17.1
opencv-contrib-python>=4.2.0.34
opencv-python==4.1.0.25
torch==1.8.1
torchvision==0.9.1
tqdm==4.45.0
numba==0.48

Log

Using cpu for inference.
Reading video frames...
Number of frames available for inference: 37
Extracting raw audio...
ffmpeg version 2.2.2 Copyright (c) 2000-2014 the FFmpeg developers
  built on May 22 2014 19:56:44 with gcc 4.8.2 (GCC)
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  2.100 /  4.  2.100
  libswscale      2.  5.102 /  2.  5.102
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mp3, from 'filename.mp3':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.45.100
  Duration: 00:00:30.12, start: 0.000000, bitrate: 228 kb/s
    Stream #0:0: Audio: mp3, 48000 Hz, stereo, s16p, 228 kb/s
Output #0, wav, to 'temp/temp.wav':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    ISFT            : Lavf55.33.100
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (mp3 -> pcm_s16le)
Press [q] to stop, [?] for help
size=    5648kB time=00:00:30.12 bitrate=1536.0kbits/s
video:0kB audio:5648kB subtitle:0 data:0 global headers:0kB muxing overhead 0.001383%
(80, 2410)
Length of mel chunks: 428
  0%|                                                                                                                                                                         | 0/4 [00:00<?, ?it/s]
  0%|                                                                                                                                                                         | 0/3 [00:00<?, ?it/s]
 33%|█████████████████████████████████████████████████████▋                                                                                                           | 1/3 [00:05<00:10,  5.29s/it]
 67%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▎                                                     | 2/3 [00:10<00:05,  5.24s/it]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:12<00:00,  4.02s/it]
Load checkpoint from: C:\GIT\Wav2Lip\checkpoints
  0%|                                                                                                                                                                         | 0/4 [00:12<?, ?it/s]
Traceback (most recent call last):
  File ".\inference.py", line 280, in <module>
    main()
  File ".\inference.py", line 252, in main
    model = load_model(args.checkpoint_path)
  File ".\inference.py", line 171, in load_model
    checkpoint = _load(path)
  File ".\inference.py", line 165, in _load
    map_location=lambda storage, loc: storage)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\serialization.py", line 579, in load
    with _open_file_like(f, 'rb') as opened_file:
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\serialization.py", line 230, in _open_file_like
    return _open_file(name_or_buffer, mode)
  File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\serialization.py", line 211, in __init__
    super(_open_file, self).__init__(open(name, mode))
PermissionError: [Errno 13] Permission denied: 'C:\\GIT\\Wav2Lip\\checkpoints'
ThePieMonster commented 3 years ago

Tried this project out on Google Colab, does not work that great with music files I noticed which is what I was after. Not going to continue following this so closing.