Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while loading the model #219

Open
Parvez2017 opened this issue Mar 11, 2021 · 1 comment
Open

Error while loading the model #219

Parvez2017 opened this issue Mar 11, 2021 · 1 comment

Comments

@Parvez2017
Copy link

Parvez2017 commented Mar 11, 2021

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'.
@AIKalix
Copy link

AIKalix commented Oct 13, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants