When I run the demo command, my command is as follows: python3 scripts/example.py --ckpt=./2M.ckpt --device=cuda --partition=placement_generalization --task=visual_manipulation
Error after running: pybullet build time: May 20 2022 19:45:31
[INFO] 17 tasks loaded
Traceback (most recent call last):
File "/data/code/VIMA-code/scripts/example.py", line 506, in
main(arg)
File "/data/anaconda3/envs/VIMA/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/data/code/VIMA-code/scripts/example.py", line 84, in main
policy = create_policy_from_ckpt(cfg.ckpt, cfg.device)
File "/data/code/VIMA-code/vima/init.py", line 11, in create_policy_from_ckpt
policy_instance.load_state_dict(
File "/data/anaconda3/envs/VIMA/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1604, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for VIMAPolicy:
Unexpected key(s) in state_dict: "xattn_gpt.h.0.attn.bias"
I tried to replace other ckpt files, and the same error was reported, all of which failed to load the model.
When I run the demo command, my command is as follows: python3 scripts/example.py --ckpt=./2M.ckpt --device=cuda --partition=placement_generalization --task=visual_manipulation Error after running: pybullet build time: May 20 2022 19:45:31 [INFO] 17 tasks loaded Traceback (most recent call last): File "/data/code/VIMA-code/scripts/example.py", line 506, in
main(arg)
File "/data/anaconda3/envs/VIMA/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/data/code/VIMA-code/scripts/example.py", line 84, in main
policy = create_policy_from_ckpt(cfg.ckpt, cfg.device)
File "/data/code/VIMA-code/vima/init.py", line 11, in create_policy_from_ckpt
policy_instance.load_state_dict(
File "/data/anaconda3/envs/VIMA/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1604, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for VIMAPolicy:
Unexpected key(s) in state_dict: "xattn_gpt.h.0.attn.bias"
I tried to replace other ckpt files, and the same error was reported, all of which failed to load the model.
I refer to other people's methods to solve it successfully: https://github.com/vimalabs/VIMA/issues/20#issue-1822380410