These three lines don't load the models into the desired device and should be replaced:
|
ckpt = torch.load(ckpt_path) |
|
ckpt = torch.load("hifigan/generator_LJSpeech.pth.tar") |
|
ckpt = torch.load("hifigan/generator_universal.pth.tar") |
with something like this:
torch.load(ckpt_path, map_location=device)
.