MotionGPT3
MotionGPT3 copied to clipboard
May I ask if there is any code available here for training your own VAE model from scratch
I want to train the VAE model by myself. May I ask if there is any relevant code provided in the project?
Our codebase includes support for VAE training. However, since this feature has not been fully validated, you may need to verify its functionality by referring to the configurations in mld or other related implementations, depending on your specific requirements.
If you would like to train the VAE directly based on our code, please follow these steps:
1. Modify the config file
- Comment out:
lm_ablationmodel.params.lmmodel.diff_loss- other settings related to language_model
- Check and modify settings for VAE training :
NAME: VAE
TRAIN:
stage: vae
BATCH_SIZE: 128
END_EPOCH: 3000
PRETRAINED: ''
OPTIM:
params:
lr: 1e-4
METRIC:
TYPE: ['TemosMetric', 'TM2TMetrics']
LOSS:
LAMBDA_FEATURE: 1.0
LAMBDA_VELOCITY: 0.5
LAMBDA_KL: 1e-4
model:
target: motGPT.models.motgpt.MotGPT
params:
motion_vae: ${vae.mldvae} # 确认 model.params.motion_vae的设置符合需求
2. Modify motGPT/models/motgpt.py
- Comment out or use conditional statements (
if... else) to skip the initialization of thelanguage_model - Verify that the optimizer are correctly initialized.
- Check
motGPT/losses/motgpt.py
- Review and ensure that the computations with
stage == "vae"are correctly implemented.