open-clip-torch version
When I run get_clip_feature.py, I get an error that the model cannot be read. I download ViT-B-16-laion2b_s34b_b88k.bin and set the path. I guess the error may be related to the open-clip-torch version. Which version do you use?
Hi, we use open-clip-torch=2.22.0
I have met the same problem. I tried open-clip-torch=2.22.0 but it still gets
Traceback (most recent call last):
File "get_clip_features.py", line 19, in
I have met the same problem. I tried open-clip-torch=2.22.0 but it still gets Traceback (most recent call last): File "get_clip_features.py", line 19, in clip_model = load_clip() File "/home/code/SegAnyGAussians-2/clip_utils/clip_utils.py", line 214, in load_clip return OpenCLIPNetwork(OpenCLIPNetworkConfig) File "/home/code/SegAnyGAussians-2/clip_utils/clip_utils.py", line 76, in init model, _, _ = open_clip.create_model_and_transforms( File "/root/miniconda3/envs/gaussian_splatting_saga/lib/python3.8/site-packages/open_clip/factory.py", line 324, in create_model_and_transforms model = create_model( File "/root/miniconda3/envs/gaussian_splatting_saga/lib/python3.8/site-packages/open_clip/factory.py", line 237, in create_model load_checkpoint(model, checkpoint_path) File "/root/miniconda3/envs/gaussian_splatting_saga/lib/python3.8/site-packages/open_clip/factory.py", line 103, in load_checkpoint state_dict = load_state_dict(checkpoint_path) File "/root/miniconda3/envs/gaussian_splatting_saga/lib/python3.8/site-packages/open_clip/factory.py", line 88, in load_state_dict checkpoint = torch.load(checkpoint_path, map_location=map_location) File "/root/miniconda3/envs/gaussian_splatting_saga/lib/python3.8/site-packages/torch/serialization.py", line 713, in load return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args) File "/root/miniconda3/envs/gaussian_splatting_saga/lib/python3.8/site-packages/torch/serialization.py", line 920, in _legacy_load magic_number = pickle_module.load(f, **pickle_load_args) _pickle.UnpicklingError: invalid load key, 'v'.
@tom-gao-gyc Hi, sorry for the late response. I'm not sure why this happened. Where did you get your CLIP ckpt from? I re-checked my open clip version and I'm sure it is 2.22.0. Did you install it with pip?
我遇到了同样的问题。我尝试了 open-clip-torch=2.22.0,但它仍然得到回溯(最近调用最后一次):文件“get_clip_features.py”,第 19 行,clip_model = load_clip() 文件“/home/code/SegAnyGAussians-2/clip_utils/clip_utils.py”,第 214 行,load_clip返回 OpenCLIPNetwork(OpenCLIPNetworkConfig) 文件“/home/code/SegAnyGAussians-2/clip_utils/clip_utils.py”,第 76 行,initmodel, _, _ = open_clip.create_model_and_transforms( 文件 “/root/miniconda3/envs/gaussian_splatting_saga/lib/python3.8/site-packages/open_clip/factory.py”, 第 324 行, create_model_and_transforms model = create_model( 文件 “/root/miniconda3/envs/gaussian_splatting_saga/lib/python3.8/site-packages/open_clip/factory.py”, 第 237 行, create_model load_checkpoint 中(model, checkpoint_path)文件 “/root/miniconda3/envs/gaussian_splatting_saga/lib/python3.8/site-packages/open_clip/factory.py”,第 103 行,load_checkpoint state_dict = load_state_dict(checkpoint_path)文件 “/root/miniconda3/envs/gaussian_splatting_saga/lib/python3.8/site-packages/open_clip/factory.py”,第 88 行,load_state_dict检查点 = torch.load(checkpoint_path, map_location=map_location)文件“/root/miniconda3/envs/gaussian_splatting_saga/lib/python3.8/site-packages/torch/serialization.py”,第 713 行,加载返回_legacy_load(opened_file,map_location,pickle_module,**pickle_load_args)文件“/root/miniconda3/envs/gaussian_splatting_saga/lib/python3.8/site-packages/torch/serialization.py”,第 920 行,_legacy_load magic_number = pickle_module.load(f, **pickle_load_args) _pickle。UnpicklingError:无效的加载键 'v'。
我也遇到了这个问题,请问您解决了
I used the open clip Torch version 2.4.0 and the problem was solved.
我使用了 open clip Torch 版本 2.4.0,问题解决了。
我依旧出现了这个问题_pickle.UnpicklingError: invalid load key, 'v'.
我使用了 open clip Torch 版本 2.4.0,问题解决了。
我依旧出现了这个问题_pickle.UnpicklingError: invalid load key, 'v'.
I used the open clip Torch version 2.4.0 and the problem was solved
我使用了 open clip Torch 版本 2.4.0,问题解决了。
我依旧出现了这个问题_pickle.UnpicklingError: invalid load key, 'v'.
I'm also having the same issue. Changing the open-clip-torch version to 2.22.0 or 2.4.0 didn't resolve it. Have you managed to fix it now?