Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: Invalid load key, 'v'. #12

Open
Zalmighty opened this issue Dec 5, 2023 · 2 comments
Open

error: Invalid load key, 'v'. #12

Zalmighty opened this issue Dec 5, 2023 · 2 comments

Comments

@Zalmighty
Copy link

img_v3_025r_d23a3324-3119-4455-8367-e671a17a74dg
After I installed according to the instructions, I executed the I2V instructions, reported the error, and the model was placed in the specified position. How to address it?

@a1mrz
Copy link

a1mrz commented Apr 4, 2024

Try re-downloading both seine.pt and stable-diffusion model, worked for me.

@AmahaShadow
Copy link

so either a missed a step, or I have the same issue.
tested on my win 11 machine and in arch (both my usual system and a new vm spinned for testing this)
installed miniconda
ran

conda init
conda create -n seine python==3.9.16
conda activate seine
mkdir ai 
cd ai
git clone https://github.com/Vchitect/SEINE
cd SEINE/
mkdir pretrained
pip install -r requirement.txt
cd pretrained
git clone https://huggingface.co/CompVis/stable-diffusion-v1-4
wget https://huggingface.co/Vchitect/SEINE/resolve/main/seine.pt?download=true -O seine.pt
cd ..
python sample_scripts/with_mask_sample.py --config configs/sample_i2v.yaml

and i get the error

(seine)  [nicolas@s117:~/dev/ai/SEINE]
 $>python sample_scripts/with_mask_sample.py --config configs/sample_i2v.yaml
loading model
Traceback (most recent call last):
  File "/home/nicolas/dev/ai/SEINE/sample_scripts/with_mask_sample.py", line 243, in <module>
    main(omega_conf)
  File "/home/nicolas/dev/ai/SEINE/sample_scripts/with_mask_sample.py", line 190, in main
    model = get_models(args).to(device)
  File "/home/nicolas/dev/ai/SEINE/models/__init__.py", line 30, in get_models
    return UNet3DConditionModel.from_pretrained_2d(pretrained_model_path, subfolder="unet", use_concat=args.use_mask)
  File "/home/nicolas/dev/ai/SEINE/models/unet.py", line 646, in from_pretrained_2d
    state_dict = torch.load(model_file, map_location="cpu")
  File "/home/nicolas/miniconda.3/envs/seine/lib/python3.9/site-packages/torch/serialization.py", line 815, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "/home/nicolas/miniconda.3/envs/seine/lib/python3.9/site-packages/torch/serialization.py", line 1033, in _legacy_load
    magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, 'v'.
[ble: exit 1]

tried with the google drive version of seine.pt as well
i also verified the seine.pt is a valid, non-corrupted zip file (and it checks out)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants