vall-e/vall_e/export.py

21 lines
489 B
Python
Raw Normal View History

2023-08-02 21:53:35 +00:00
import argparse
import torch
from .data import get_phone_symmap
from .engines import load_engines
2023-08-14 03:56:28 +00:00
from .config import cfg
2023-08-02 21:53:35 +00:00
def main():
parser = argparse.ArgumentParser("Save trained model to path.")
2023-08-20 18:42:18 +00:00
parser.add_argument("--module-only", action='store_true')
2023-08-02 21:53:35 +00:00
args = parser.parse_args()
2023-08-20 18:42:18 +00:00
if args.module_only:
cfg.trainer.load_module_only = True
2023-08-14 03:56:28 +00:00
engines = load_engines()
engines.export(userdata={"symmap": get_phone_symmap()})
2023-08-02 21:53:35 +00:00
if __name__ == "__main__":
main()