NVIDIA / waveglow

A Flow-based Generative Network for Speech Synthesis
BSD 3-Clause "New" or "Revised" License
2.29k stars 530 forks source link

Python 3.8/Torch 1.6 'Conv1d' object has no attribute '_non_persistent_buffers_set' #235

Open jonaskohler opened 4 years ago

jonaskohler commented 4 years ago

Hi there

first off, thanks for open sourcing your code. It has worked great for me in the past. I have updated to Python 3.8/Torch 1.6 lately and even after downloading your latest release

_python3 inference.py -f <(ls mel_spectrograms/*.pt) -w waveglow_256channels_universal_v5.pt -o . --isfp16 -s 0.6

gives

_torch.nn.modules.module.ModuleAttributeError: 'Conv1d' object has no attribute '_non_persistent_buffersset'

Can you help me out please?

beckernick commented 4 years ago

Hey @jonaskohler . Not a maintainer of this library, but I believe this may be the following issue: https://discuss.pytorch.org/t/how-to-load-an-older-model-in-pytorch-1-6/97423

If you downgrade to 1.5.1, things might just work.

rafaelvalle commented 4 years ago
for k, m in waveglow.named_modules():
   m._non_persistent_buffers_set = set()  # pytorch 1.6.0 compatability
jonaskohler commented 4 years ago

great, thanks a lot :)!

sungjae-cho commented 3 years ago

It works for pytorch 1.6.0 !