mirror of
https://github.com/openai/CLIP.git
synced 2026-11-05 01:37:26 +00:00
[GH-ISSUE #106] is there any way to work with torchvision 0.9.0 instead of 0.8.2 ? #94
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#94
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 @nickums on GitHub (May 16, 2021).
Original GitHub issue: https://github.com/openai/CLIP/issues/106
Is there any way I can install and run with torchvision 0.9.0?
I have this version and pip cannot find the 0.8.2 required by CLIP
@torridgristle commented on GitHub (May 21, 2021):
I can run CLIP without issue on PyTorch 1.8.1+cu101 and Torchvision 0.9.1+cu101 with a small change. I compared 1000 image encodes with and without this change, the difference seems small and the cosine similarity between the encodes with and without the change were all 1.0 or 0.999 aside from one outlier.
If you have everything you need to run CLIP, just not the old versions of things it asks for, install it with
and load CLIP with
clip.load("ViT-B/32", jit=False). It needed the jit=False for a reason unknown to me.@nickums commented on GitHub (May 23, 2021):
many thanks for that extremely helpful info, --no-deps is a revelation.
I now have to wrestle with 'AttributeError: module 'clip' has no attribute 'load'
@jongwook commented on GitHub (Jul 19, 2021):
A recent commit (
db20393f4a) removed the specific torch and torchvision versions fromrequirements.txtto avoid the dependency hell and also the conda/pip UX fiasco to some degree. Now the code should work okay with reasonably recent torch/torchvision although future updates may break these anytime. I'd still recommend pinning their versions that works for your application!