Skip to content

Commit

Permalink
feat: fixed return type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelLarkin committed Nov 26, 2024
1 parent 38f946d commit 73e144f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hfgl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ def sizeof_fmt(num, suffix="B"):
return f"{num:.1f}Yi{suffix}"


def load_hifigan_from_checkpoint(ckpt: dict, device) -> Tuple[HiFiGAN, HiFiGANConfig]:
def load_hifigan_from_checkpoint(
ckpt: dict, device
) -> Tuple[HiFiGAN | HiFiGANGenerator, HiFiGANConfig]:
config: dict | HiFiGANConfig = ckpt["hyper_parameters"]["config"]
if isinstance(config, dict):
from pydantic import ValidationError
Expand Down

0 comments on commit 73e144f

Please sign in to comment.