deepvoice3_pytorch icon indicating copy to clipboard operation
deepvoice3_pytorch copied to clipboard

Error while loading the model

Open Parvez2017 opened this issue 4 years ago • 1 comments

When I tried to do synthesis with a saved checkpoint, it gives pickle error. I tried on stackoverflow and pytorch forum, but could not get any help.

some similar issues were https://stackoverflow.com/questions/63063723/how-to-fix-pickle-module-loadf-pickle-load-args-pickle-unpicklingerror-i https://discuss.pytorch.org/t/trying-to-load-a-model-in-pytorch-1-6-results-in-pickle-unpicklingerror-invalid-load-key-xad/95615

  • I am using pytorch version 1.8

  File "synthesis.py", line 126, in <module>
    checkpoint = _load(checkpoint_path)
  File "synthesis.py", line 78, in _load
    checkpoint = torch.load(checkpoint_path)
  File "C:\Users\LENOVO\deepfake-voice\env\lib\site-packages\torch\serialization.py", line 593, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "C:\Users\LENOVO\deepfake-voice\env\lib\site-packages\torch\serialization.py", line 762, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, 'f'.

Parvez2017 avatar Mar 11 '21 08:03 Parvez2017

I got a similar error. When I tried to synthesis and vocode with Spanish, It gives pickle and EOFError.

Trainable Parameters: 30.870M Traceback (most recent call last): File "/Users/ryuma/Desktop/Graduation_Study/Real-Time-Voice-Cloning-master/toolbox/init.py", line 129, in func = lambda: self.translate() or self.vocode() File "/Users/ryuma/Desktop/Graduation_Study/Real-Time-Voice-Cloning-master/toolbox/init.py", line 413, in translate specs = self.synthesizer.synthesize_spectrograms(texts, embeds) File "/Users/ryuma/Desktop/Graduation_Study/Real-Time-Voice-Cloning-master/synthesizer/inference.py", line 86, in synthesize_spectrograms self.load() File "/Users/ryuma/Desktop/Graduation_Study/Real-Time-Voice-Cloning-master/synthesizer/inference.py", line 64, in load self._model.load(self.model_fpath) File "/Users/ryuma/Desktop/Graduation_Study/Real-Time-Voice-Cloning-master/synthesizer/models/tacotron.py", line 496, in load checkpoint = torch.load(str(path), map_location=device) File "/usr/local/lib/python3.8/site-packages/torch/serialization.py", line 595, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "/usr/local/lib/python3.8/site-packages/torch/serialization.py", line 764, in _legacy_load magic_number = pickle_module.load(f, **pickle_load_args) EOFError: Ran out of input

AIKalix avatar Oct 13 '21 01:10 AIKalix