MotionGPT3 icon indicating copy to clipboard operation
MotionGPT3 copied to clipboard

[Bug] No such file or directory: 'checkpoints/motiongpt3.ckpt' But not motiongpt3.pth

Open Gdw040199 opened this issue 1 year ago • 1 comments

[Bug] No such file or directory: 'checkpoints/motiongpt3.ckpt' But not motiongpt3.pth

After using the command bash prepare/download_pretrained_motiongpt3_model.sh, the model weight file that appears in the checkpoints/ folder is motiongpt3.pth. And an error shows: No such file or directory: 'checkpoints/motiongpt3.ckpt'

Attempt

I downloaded the motiongpt3.ckpt provided by the author through the huggingface link. But another mistake occurred.

Traceback (most recent call last): File "/root/autodl-tmp/MotionGPT3/app.py", line 37, in <module> state_dict = torch.load(cfg.TEST.CHECKPOINTS, map_location="cpu")["state_dict"] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^ 
KeyError: 'state_dict'

I'm now wondering if it would be appropriate to directly change the weight extension .pth downloaded in command bash prepare/download_pretrained_motiongpt3_model.sh to .ckpt, or if the author could provide other methods.

Gdw040199 avatar Oct 22 '25 01:10 Gdw040199

Thanks for the report! The issue came from the old motiongpt3.pth contained only the model’s raw state_dict instead of a dictionary, which caused loading to fail. We’ve updated both files on Google Drive and Hugging Face so the checkpoint now should work correctly.

You can fix this by either:

  1. Re-download the updated version from Google Drive or Hugging Face.

  2. Convert your already-downloaded motiongpt3.pth

import torch
states = torch.load('./checkpoints/motiongpt3.pth')
torch.save({'state_dict':states ,'epoch':-1}, './checkpoints/motiongpt3.ckpt')

Thanks again—please let us know if you still run into any loading issues!

BoifZ avatar Oct 25 '25 04:10 BoifZ