mirror of
https://github.com/openai/CLIP.git
synced 2026-11-05 01:37:26 +00:00
[GH-ISSUE #67] Non-jit version model archive #61
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openai/CLIP#61
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LucasWangZH on GitHub (Mar 23, 2021).
Original GitHub issue: https://github.com/openai/CLIP/issues/67
Hi,
do you have a non-jit version model archive. To get a non-jit version model by fetching state_dict from the current jit version model archive would encounter following problem:
D:\anaconda3\envs\torch171\python.exe D:/code/CLIP-main/main.py
Traceback (most recent call last):
File "D:/code/CLIP-main/main.py", line 16, in
model = clip.load(name,device,jit=False)
File "D:\code\CLIP-main\clip\clip.py", line 114, in load
model = build_model(state_dict or model.state_dict()).to(device)
File "D:\code\CLIP-main\clip\model.py", line 431, in build_model
model.load_state_dict(state_dict)
File "D:\anaconda3\envs\torch171\lib\site-packages\torch\nn\modules\module.py", line 1051, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for CLIP:
size mismatch for logit_scale: copying a param with shape torch.Size([]) from checkpoint, the shape in current model is torch.Size([1]).
@jongwook commented on GitHub (Mar 23, 2021):
Hi, there was a temporary bug (#66) regarding this earlier today. Does it still happen with the latest commit
github.com/openai/CLIP@8a665a683d?@LucasWangZH commented on GitHub (Mar 23, 2021):
Great! The bug is gone with the latest commit.