NVIDIA / flowtron

Flowtron is an auto-regressive flow-based generative network for text to speech synthesis with control over speech variation and style transfer
https://nv-adlr.github.io/Flowtron
Apache License 2.0
892 stars 177 forks source link

Problem with inference_style_transfer #127

Open Syed044 opened 3 years ago

Syed044 commented 3 years ago

Hello,

When you check the examples, its very exciting to invest time and effort to collect the data and train the model, however after putting a lot of effort in collecting data and training. You hit an error.

KeyError Traceback (most recent call last)

in 1 model_path = "models/model_10100" ----> 2 state_dict = torch.load(model_path, map_location='cpu')['state_dict'] 3 model = Flowtron(**model_config) 4 model.load_state_dict(state_dict) 5 _ = model.eval().cuda() KeyError: 'state_dict' i am a newbee still trying to learn so please bare with me and help me how to solve this issue.
deepglugs commented 3 years ago

try changing 'state_dict' to 'model'

state_dict = torch.load(model_path, map_location='cpu')['model'].state_dict()