NVIDIA / tacotron2

Tacotron 2 - PyTorch implementation with faster-than-realtime inference
BSD 3-Clause "New" or "Revised" License
5.07k stars 1.38k forks source link

unable to load waveGlow model to synthesize voice in infrence.ipyb #281

Closed nimamoradi closed 4 years ago

nimamoradi commented 4 years ago

I trained tacotron model with my custom dataset and I want to test its performance, but I am unable to load waveglow model using pytorch version "1.2.0" version.
here is the log


Traceback (most recent call last):
  File "runner.py", line 35, in 
    waveglow = torch.load(waveglow_path,map_location='cpu')['model']
  File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 386, in load
    return _load(f, map_location, pickle_module, **pickle_load_args)
  File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 563, in _load
    magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '\x0a'.
i test tacotron trained model with torch version 1.0.0 but it was unable to load it.
PS: it think its versioning conflict problem but testing version 1.1.0 and 1.0.0 don't seam to reslove the problem
mingfengwuye commented 4 years ago

s = pickle.load(f, encoding='latin1') add encoding param to this function