PKU-YuanGroup / MagicTime

MagicTime: Time-lapse Video Generation Models as Metamorphic Simulators

Home Page:https://pku-yuangroup.github.io/MagicTime/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exception running inference_magictime.py _pickle.UnpicklingError: invalid load key, 'v'.

truedat101 opened this issue · comments

Pickle error on Linux ubuntu 22.04.

Will investigate.

10:42 $ python inference_magictime.py --config sample_configs/RealisticVision.yaml
The results will be save to outputs/RealisticVision-7
Use MagicAdapter-S
Use MagicAdapter-T
Use Magic_Text_Encoder
loaded 3D unet's pretrained weights from ./ckpts/Base_Model/stable-diffusion-v1-5/unet ...
### missing keys: 560; 
### unexpected keys: 0;
### Motion Module Parameters: 417.1376 M
load motion module from ./ckpts/Base_Model/motion_module/motion_module.ckpt
load dreambooth model from ./ckpts/DreamBooth/RealisticVisionV60B1_v51VAE.safetensors
load domain lora from ./ckpts/Magic_Weights/magic_adapter_s/magic_adapter_s.ckpt
Traceback (most recent call last):
  File "MagicTime/inference_magictime.py", line 249, in <module>
    main(args)
  File "miniforge3/envs/magictime/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "MagicTime/inference_magictime.py", line 76, in main
    pipeline = load_weights(
  File "MagicTime/utils/util.py", line 137, in load_weights
    magic_adapter_s_state_dict = torch.load(magic_adapter_s_path, map_location="cpu")
  File "miniforge3/envs/magictime/lib/python3.10/site-packages/torch/serialization.py", line 1040, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "miniforge3/envs/magictime/lib/python3.10/site-packages/torch/serialization.py", line 1258, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, 'v'.

This is because of down_magic_time_module.sh was done without properly git-lfs (see #21 ), and so this is the error. Redo the download and it gets past this error.