1414
1515from fastvideo .fastvideo_args import FastVideoArgs , TrainingArgs
1616from fastvideo .utils import FlexibleArgumentParser
17+ from fastvideo .utils import FlexibleArgumentParser
1718from fastvideo .training .runner import main
19+ from fastvideo .utils import build_parser
1820
1921wandb_name = "test_training_loss"
2022a40_reference_wandb_summary_file = "fastvideo/tests/training/Vanilla/a40_reference_wandb_summary.json"
2830def run_worker ():
2931 """Worker function that will be run on each GPU"""
3032 # Create and populate args
31- parser = FlexibleArgumentParser ()
32- parser = TrainingArgs .add_cli_args (parser )
33- parser = FastVideoArgs .add_cli_args (parser )
33+ parser = build_parser ()
3434
3535 # Set the arguments as they are in finetune_v1_test.sh
3636 args = parser .parse_args ([
37+ "--pipeline_class" , "WanTrainingPipeline" ,
38+ "--pipeline_module" , "fastvideo.training.wan_training_pipeline" ,
3739 "--model_path" , "Wan-AI/Wan2.1-T2V-1.3B-Diffusers" , "--inference_mode" , "False" ,
3840 "--pretrained_model_name_or_path" , "Wan-AI/Wan2.1-T2V-1.3B-Diffusers" , "--data_path" ,
3941 "data/crush-smol_processed_t2v/combined_parquet_dataset" , "--validation_dataset_file" ,
@@ -49,9 +51,6 @@ def run_worker():
4951 "--num_euler_timesteps" , "50" , "--multi_phased_distill_schedule" , "4000-1" , "--weight_decay" , "0.01" ,
5052 "--not_apply_cfg_solver" , "--dit_precision" , "fp32" , "--max_grad_norm" , "1.0"
5153 ])
52- # Call the main training function
53- args .pipeline_class = "WanTrainingPipeline"
54- args .pipeline_module = "fastvideo.training.wan_training_pipeline"
5554
5655 # Call the main training function
5756 main (args )
0 commit comments