Skip to content

Commit

Permalink
fix: call check_and_upgrade_checkpoint()
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelLarkin committed Nov 5, 2024
1 parent 4badc36 commit fbf198b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hfgl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,12 @@ def load_hifigan_from_checkpoint(ckpt: dict, device) -> Tuple[HiFiGAN, HiFiGANCo
model = HiFiGAN(config).to(device)
else:
model = HiFiGANGenerator(config).to(device)

ckpt = model.check_and_upgrade_checkpoint(ckpt)
model.load_state_dict(ckpt["state_dict"])
model.generator.eval()
model.generator.remove_weight_norm()

return model, config


Expand Down

0 comments on commit fbf198b

Please sign in to comment.