neonbjb / tts-scores

Scripts for computing the Intelligibility and CLVP scores for evaluating TTS models
Apache License 2.0
142 stars 15 forks source link

FileNotFoundError: [Errno 2] No such file or directory: '.data/clvp.pth' #16

Closed CamellIyquitous closed 1 month ago

CamellIyquitous commented 1 month ago

Does anyone know how to solve the following problem? Is this repository no longer maintained?

FileNotFoundError Traceback (most recent call last) Cell In[7], line 1 ----> 1 cv_metric = CLVPMetric(device='cuda') 2 # score = cv_metric.compute_fd('', '') 3 score = cv_metric.compute_fd(pred_audio_path, data[1]['audio_path'])

File ~/tts-scores/tts_scores/clvp.py:304, in CLVPMetric.init(self, device, pretrained_path) 300 self.device = device 301 self.model = CLVP(model_dim=512, transformer_heads=8, dropout=0, num_text_tokens=256, text_enc_depth=8, 302 text_mask_percentage=0, conditioning_enc_depth=4, speech_enc_depth=8, 303 speech_mask_percentage=0, latent_multiplier=2).eval().to(device) --> 304 sd = torch.load(pretrained_path, map_location=device) 305 self.model.load_state_dict(sd) 306 self.tokenizer = VoiceBpeTokenizer()

File ~/anaconda3/envs/tts_scores/lib/python3.10/site-packages/torch/serialization.py:1319, in load(f, map_location, pickle_module, weights_only, mmap, **pickle_load_args) 1316 if "encoding" not in pickle_load_args.keys(): 1317 pickle_load_args["encoding"] = "utf-8" -> 1319 with _open_file_like(f, "rb") as opened_file: 1320 if _is_zipfile(opened_file): 1321 # The zipfile reader is going to advance the current file position. 1322 # If we want to actually tail call to torch.jit.load, we need to 1323 # reset back to the original position. 1324 orig_position = opened_file.tell() ... File ~/anaconda3/envs/tts_scores/lib/python3.10/site-packages/torch/serialization.py:640, in _open_file.init(self, name, mode) 639 def init(self, name, mode): --> 640 super().init(open(name, mode))

FileNotFoundError: [Errno 2] No such file or directory: '.data/clvp.pth'

CamellIyquitous commented 1 month ago

solved it. https://github.com/neonbjb/tts-scores/issues/4#issue-1820983200