Open AI-Guru opened 3 years ago
take a look at the keys for flowtron_libritts2p3k
.
i think we saved the model instead of just the state dict.
the code below should solve your issue.
ck = torch.load(flowtron_path, map_location='cpu')
if 'model' in ck:
state_dict = ck['model'].state_dict()
else:
state_dict = ck['state_dict']
KeyError Traceback (most recent call last)
# load flowtron
model = Flowtron(**model_config).cuda()
checkpoint = torch.load(flowtron_path, map_location='cpu')
if 'model' in checkpoint:
state_dict = checkpoint['model'].state_dict()
else:
state_dict = checkpoint['state_dict']
model.load_state_dict(state_dict)
model.eval()
model.cuda()
print("Loaded checkpoint '{}')" .format(flowtron_path))
This should help!
Hello!
I am very happy with Flowtron! I tested the flowtron_ljs model and it worked like a charm!
But when using the other two models, I run into problems. For example flowtron_libritts2p3k.
Gives me this output:
Any ideas?