| 697 | |
| 698 | |
| 699 | def parse_args() -> argparse.Namespace: |
| 700 | parser = argparse.ArgumentParser( |
| 701 | description="Validate inputs for fusing a MOSS-TTS checkpoint with a codec checkpoint." |
| 702 | ) |
| 703 | _ = parser.add_argument( |
| 704 | "--model-path", |
| 705 | required=True, |
| 706 | help="Path to the main model checkpoint directory.", |
| 707 | ) |
| 708 | _ = parser.add_argument( |
| 709 | "--codec-model-path", |
| 710 | required=True, |
| 711 | help="Path to the codec model checkpoint directory.", |
| 712 | ) |
| 713 | _ = parser.add_argument( |
| 714 | "--save-path", |
| 715 | required=True, |
| 716 | help="Path to the fused output directory. Existing directories require --overwrite or interactive confirmation.", |
| 717 | ) |
| 718 | _ = parser.add_argument( |
| 719 | "--overwrite", |
| 720 | action="store_true", |
| 721 | help="Overwrite an existing save directory without prompting.", |
| 722 | ) |
| 723 | return parser.parse_args() |
| 724 | |
| 725 | |
| 726 | def _normalize_path(value: str, arg_name: str) -> Path: |