MotionGPT3 icon indicating copy to clipboard operation
MotionGPT3 copied to clipboard

May I ask if there is any code available here for training your own VAE model from scratch

Open caim33 opened this issue 1 year ago • 1 comments

I want to train the VAE model by myself. May I ask if there is any relevant code provided in the project?

caim33 avatar Nov 01 '25 10:11 caim33

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_ablation
    • model.params.lm
    • model.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 the language_model
  • Verify that the optimizer are correctly initialized.
  1. Check motGPT/losses/motgpt.py
  • Review and ensure that the computations with stage == "vae" are correctly implemented.

BoifZ avatar Nov 05 '25 04:11 BoifZ