FileNotFoundError: [Errno 2] No such file or directory: 'model.pth.tar'
mobassir94 opened this issue · 3 comments
inference worked few days ago but not working anymore because of broken googledrive weight file links.
Access denied with the following error:
Cannot retrieve the public link of the file. You may need to change
the permission to 'Anyone with the link', or have had many accesses.
You may still be able to access the file from the browser:
https://drive.google.com/uc?id=1J7ZP_q-6mryXUhZ-8j9-RIItz2nJGOIX
FileNotFoundError Traceback (most recent call last)
in
49 speaker_pre_trained_path = "./klaam/data/model_weights/hifigan/generator_universal.pth.tar"
50
---> 51 ar_model = TextToSpeech(prepare_tts_model_path, model_config_path, train_config_path, vocoder_config_path, speaker_pre_trained_path,root_path)
52
53
5 frames
/content/./klaam/klaam/run.py in init(self, prepare_tts_model_path, model_config_path, train_config_path, vocoder_config_path, speaker_pre_trained_path, root_path)
67 self.vocoder_config_path = vocoder_config_path
68 self.speaker_pre_trained_path = speaker_pre_trained_path
---> 69 self.model, self.vocoder, self.configs = prepare_tts_model(
70 self.configs, self.vocoder_config_path, self.speaker_pre_trained_path
71 )
/content/./klaam/klaam/external/FastSpeech2/inference.py in prepare_tts_model(configs, vocoder_config_path, speaker_pre_trained_path)
57
58 # Get model
---> 59 model = get_model_inference(configs, DEVICE, train=False)
60
61 # Load vocoder
/content/./klaam/klaam/external/FastSpeech2/utils/model.py in get_model_inference(configs, device, train)
42 if not os.path.exists(ckpt_path):
43 gdown.download(url, ckpt_path, quiet=False)
---> 44 ckpt = torch.load(ckpt_path, map_location=torch.device("cpu"))
45 model.load_state_dict(ckpt["model"])
46
/usr/local/lib/python3.8/dist-packages/torch/serialization.py in load(f, map_location, pickle_module, **pickle_load_args)
697 pickle_load_args['encoding'] = 'utf-8'
698
--> 699 with _open_file_like(f, 'rb') as opened_file:
700 if _is_zipfile(opened_file):
701 # The zipfile reader is going to advance the current file position.
/usr/local/lib/python3.8/dist-packages/torch/serialization.py in _open_file_like(name_or_buffer, mode)
228 def _open_file_like(name_or_buffer, mode):
229 if _is_path(name_or_buffer):
--> 230 return _open_file(name_or_buffer, mode)
231 else:
232 if 'w' in mode:
/usr/local/lib/python3.8/dist-packages/torch/serialization.py in init(self, name, mode)
209 class _open_file(_opener):
210 def init(self, name, mode):
--> 211 super(_open_file, self).init(open(name, mode))
212
213 def exit(self, *args):
FileNotFoundError: [Errno 2] No such file or directory: 'model.pth.tar'
sorry my bad, this error is related to gdown : https://stackoverflow.com/questions/60739653/gdown-is-giving-permission-error-for-particular-file-although-it-is-opening-up-f
Can you please re-upload model.pth.tar ?
It returns a 404 error.
@radicali94, it seems the file was removed by mistake from my drive. If someone has it I will be able to upload it.