Skip to content

Commit

Permalink
update: version number parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Artrajz committed Oct 22, 2023
1 parent bed145e commit efd913d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bert_vits2/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def load_checkpoint(checkpoint_path, model, optimizer=None, skip_optimizer=False


def process_legacy_versions(hps):
legacy_version = getattr(hps.data, "legacy", getattr(hps.data, "legacy_version", None))
if legacy_version:
prefix = legacy_version[0].lower()
version = getattr(hps, "version", getattr(hps.data, "version", None))
if version:
prefix = version[0].lower()
if prefix == "v":
legacy_version = legacy_version[1:]
return legacy_version
version = version[1:]
return version

0 comments on commit efd913d

Please sign in to comment.