baxtree / subaligner

Automatically synchronize and translate subtitles, or create new ones by transcribing, using pre-trained DNNs, Forced Alignments and Transformers. https://subaligner.readthedocs.io/
https://hub.docker.com/r/baxtree/subaligner
MIT License
442 stars 18 forks source link

ERROR: Cannot find model files at ...\lib\site-packages\subaligner\models\training\weights #71

Closed Shidouuu closed 2 years ago

Shidouuu commented 2 years ago

Command used:

&"C:\Users\Shid\AppData\Local\Programs\Python\Python37\Scripts\subaligner.exe" -m dual -v "aa aa.mkv" -s "aa aa-1.srt" -o "aa aa.srt"

Output:

2022-03-19 21:43:58.992740: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2022-03-19 21:43:58.992950: 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.
ERROR: Cannot find model files at c:\users\shid\appdata\local\programs\python\python37\lib\site-packages\subaligner\models\training\weights

  File "c:\users\shid\appdata\local\programs\python\python37\lib\site-packages\subaligner\__main__.py", line 247, in main
    exit_segfail=exit_segfail,
  File "c:\users\shid\appdata\local\programs\python\python37\lib\site-packages\subaligner\predictor.py", line 120, in predict_dual_pass
    video_file_path, subtitle_file_path, weights_file_path
  File "c:\users\shid\appdata\local\programs\python\python37\lib\site-packages\subaligner\predictor.py", line 731, in __predict
    network = self.__initialise_network(os.path.dirname(weights_file_path), self.__LOGGER)
  File "c:\users\shid\appdata\local\programs\python\python37\lib\site-packages\subaligner\predictor.py", line 488, in __initialise_network

In 0.2.0 a similar error seems to occur:

2022-03-19 22:28:13.843741: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2022-03-19 22:28:13.843904: 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.
2022-03-19 22:28:16.555773: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'nvcuda.dll'; dlerror: nvcuda.dll not found
2022-03-19 22:28:16.555975: W tensorflow/stream_executor/cuda/cuda_driver.cc:326] failed call to cuInit: UNKNOWN ERROR (303)
2022-03-19 22:28:16.562222: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: BJCG020218
2022-03-19 22:28:16.562546: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: BJCG020218
2022-03-19 22:28:16.583596: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
ERROR: [WinError 2] The system cannot find the file specified

  File "c:\users\shid\appdata\local\programs\python\python37\lib\site-packages\subaligner\__main__.py", line 218, in main
    weights_dir=os.path.join(FLAGS.training_output_directory, "models/training/weights")
  File "c:\users\shid\appdata\local\programs\python\python37\lib\site-packages\subaligner\predictor.py", line 80, in predict_single_pass
    video_file_path, subtitle_file_path, weights_file_path
  File "c:\users\shid\appdata\local\programs\python\python37\lib\site-packages\subaligner\predictor.py", line 593, in __predict
    video_file_path, True, 16000
  File "c:\users\shid\appdata\local\programs\python\python37\lib\site-packages\subaligner\media_helper.py", line 90, in extract_audio
    bufsize=1,
  File "c:\users\shid\appdata\local\programs\python\python37\lib\subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "c:\users\shid\appdata\local\programs\python\python37\lib\subprocess.py", line 1207, in _execute_child
    startupinfo)

If I take model.hdf5 from the model folder and place it in weights then it comes up with this; in 0.2.1 it comes up with the exact same error without moving it:

2022-03-19 21:53:47.468418: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2022-03-19 21:53:47.468589: 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.
ERROR: list index out of range

  File "c:\users\shid\appdata\local\programs\python\python37\lib\site-packages\subaligner\__main__.py", line 247, in main
    exit_segfail=exit_segfail,
  File "c:\users\shid\appdata\local\programs\python\python37\lib\site-packages\subaligner\predictor.py", line 120, in predict_dual_pass
    video_file_path, subtitle_file_path, weights_file_path
  File "c:\users\shid\appdata\local\programs\python\python37\lib\site-packages\subaligner\predictor.py", line 731, in __predict
    network = self.__initialise_network(os.path.dirname(weights_file_path), self.__LOGGER)
  File "c:\users\shid\appdata\local\programs\python\python37\lib\site-packages\subaligner\predictor.py", line 496, in __initialise_network
    hyperparams_path = "{}/{}".format(config_dir, hyperparams_files[0])

Python version: 3.7.9 Subaligner version: 0.2.3

baxtree commented 2 years ago

Hi @Shidouuu. Thanks for trying it out on Windows, which however has not been supported. For now to run subtitle synchronisation on Windows, please use Docker Desktop and more details can be found in here.

Shidouuu commented 2 years ago

Ah...

baxtree commented 2 years ago

Issue closed with no recent activity.