guoqincode / Open-AnimateAnyone

Unofficial Implementation of Animate Anyone
2.91k stars 233 forks source link

Some doubts about the weight of the second stage training #84

Closed wangxr1999 closed 9 months ago

wangxr1999 commented 9 months ago

hello, loaded PoseGuider's pretrained weights from /mnt/home/code/workspace/AnimateAnyone-unofficial/outputs2/poseguider_stage_2.ckpt ... Traceback (most recent call last): File "/opt/conda/envs/animate/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/opt/conda/envs/animate/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/mnt/home/code/workspace/AnimateAnyone-unofficial/demo/animate_cli.py", line 37, in animate_images(args) File "/mnt/home/code/workspace/AnimateAnyone-unofficial/demo/animate_cli.py", line 8, in animate_images animator = AnimateAnyone(config=args.config) File "/mnt/home/code/workspace/AnimateAnyone-unofficial/demo/animate.py", line 56, in init self.poseguider = PoseGuider.from_pretrained(pretrained_model_path=config.pretrained_poseguider_path) File "/mnt/home/code/workspace/AnimateAnyone-unofficial/models/hack_poseguider.py", line 92, in from_pretrained m, u = model.load_state_dict(state_dict, strict=False) File "/opt/conda/envs/animate/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1671, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for Hack_PoseGuider: size mismatch for final_proj.weight: copying a param with shape torch.Size([4, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([320, 128, 1, 1]). size mismatch for final_proj.bias: copying a param with shape torch.Size([4]) from checkpoint, the shape in current model is torch.Size([320]).

and also Hack_UNet3DConditionModel:sample = sample + latent_pose [320, 128, 1, 1]+[4, 128, 1, 1] ,What is the reason for this?thanks