| 52 | |
| 53 | # TODO:use group to group arguments |
| 54 | def parse_args(): |
| 55 | parser = argparse.ArgumentParser(description="musev Text to video") |
| 56 | parser.add_argument( |
| 57 | "-test_data_path", |
| 58 | type=str, |
| 59 | help=( |
| 60 | "Path to the test data configuration file, now only support yaml ext, " |
| 61 | "task file simialr to musev/configs/tasks/example.yaml" |
| 62 | ), |
| 63 | ) |
| 64 | parser.add_argument( |
| 65 | "--target_datas", |
| 66 | type=str, |
| 67 | default="all", |
| 68 | help="Names of the test data to run, to select sub tasks, default=`all`", |
| 69 | ) |
| 70 | parser.add_argument( |
| 71 | "--sd_model_cfg_path", |
| 72 | type=str, |
| 73 | default=os.path.join(PROJECT_DIR, "configs/model/T2I_all_model.py"), |
| 74 | help="Path to the model configuration file", |
| 75 | ) |
| 76 | parser.add_argument( |
| 77 | "--sd_model_name", |
| 78 | type=str, |
| 79 | default="all", |
| 80 | help="Names of the models to run, or path.", |
| 81 | ) |
| 82 | parser.add_argument( |
| 83 | "--unet_model_cfg_path", |
| 84 | type=str, |
| 85 | default=os.path.join(PROJECT_DIR, "./configs/model/motion_model.py"), |
| 86 | help="Path to motion_cfg path or motion unet path", |
| 87 | ) |
| 88 | parser.add_argument( |
| 89 | "--unet_model_name", |
| 90 | type=str, |
| 91 | default="musev_referencenet", |
| 92 | help=( |
| 93 | "class Name of the unet model, use load_unet_by_name to init unet," |
| 94 | "now only support `musev`, `musev_referencenet`," |
| 95 | ), |
| 96 | ) |
| 97 | parser.add_argument( |
| 98 | "--lcm_model_cfg_path", |
| 99 | type=str, |
| 100 | default=os.path.join(PROJECT_DIR, "./configs/model/lcm_model.py"), |
| 101 | help="Path to lcm lora path", |
| 102 | ) |
| 103 | parser.add_argument( |
| 104 | "--lcm_model_name", |
| 105 | type=str, |
| 106 | default=None, |
| 107 | help="lcm model name, None means do not use lcm_lora default=`None`", |
| 108 | choices=[ |
| 109 | "lcm", |
| 110 | ], |
| 111 | ) |