Train AniPortrait (Stage 1 and Stage 2)
mainData Preparation
Extract keypoints from raw videos (VFHQ/CelebV-HQ) and generate a training JSON:
python -m scripts.preprocess_dataset --input_dir VFHQ_PATH --output_dir SAVE_PATH --training_json JSON_PATHUpdate the data.json_path in your training config.
Stage 1 Training
accelerate launch train_stage_1.py --config ./configs/train/stage1.yamlStage 2 Training
- Download
mm_sd_v15_v2.ckptand place it in./pretrained_weights. - In
stage2.yaml, specify the Stage 1 checkpoint directory and step:
stage1_ckpt_dir: './exp_output/stage1'
stage1_ckpt_step: 30000 - Run training:
accelerate launch train_stage_2.py --config ./configs/train/stage2.yaml