li-ronghui / LODGE

The code the CVPR2024 paper Lodge: A Coarse to Fine Diffusion Network for Long Dance Generation Guided by the Characteristic Dance Primitives
105 stars 6 forks source link

After partial training with global is complete, an error is reported when the model is called #10

Open Star-Chou opened 4 months ago

Star-Chou commented 4 months ago

Traceback (most recent call last): File "infer_lodge.py", line 340, in test(cfg) File "infer_lodge.py", line 180, in test model_coarse.load_state_dict(state_dict, strict=True) File "/mnt/inais/data1/syp/LODGE/dld/models/modeltype/base.py", line 208, in load_state_dict super().load_state_dict(state_dict, strict) File "/root/miniconda3/envs/lodge1/lib/python3.8/site-packages/torch/nn/modules/module.py", line 2041, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for Global_Module: size mismatch for DanceDecoder.null_cond_embed: copying a param with shape torch.Size([1, 256, 512]) from checkpoint, the shape in current model is torch.Size([1, 1024, 512]). size mismatch for diffusion.model.null_cond_embed: copying a param with shape torch.Size([1, 256, 512]) from checkpoint, the shape in current model is torch.Size([1, 1024, 512]). size mismatch for diffusion.master_model.null_cond_embed: copying a param with shape torch.Size([1, 256, 512]) from checkpoint, the shape in current model is torch.Size([1, 1024, 512])

li-ronghui commented 4 months ago

It seems that your trained Global Diffusion's length is 512, but the infer_lodge's setting is 1024. You can set the FINEDANCE.full_seq_len as 1024 when traing the Global Diffusion.