error: Invalid load key, 'v'.
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?
Try re-downloading both seine.pt and stable-diffusion model, worked for me.
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)
i think you are doing git clone https://huggingface.co/CompVis/stable-diffusion-v1-4/ . But it is not downloading the weights of unet and vae. Try using wget to download the weights.