Skip to content

Commit

Permalink
Fix PyTorch version check for nightly builds (openai#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiahuei authored Nov 5, 2021
1 parent 2867559 commit 1a8b4b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clip/clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
BICUBIC = Image.BICUBIC


if [int(n.split("+")[0]) for n in torch.__version__.split(".")] < [1, 7, 1]:
if [int(n.split("+")[0]) for n in torch.__version__.split(".")[:3]] < [1, 7, 1]:
warnings.warn("PyTorch version 1.7.1 or higher is recommended")


Expand Down

0 comments on commit 1a8b4b2

Please sign in to comment.