Skip to content

Commit

Permalink
force einops 0.6.1 or greater and call allow_ops_in_compiled_graph
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Apr 20, 2023
1 parent 0069857 commit 00e07b7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions dalle2_pytorch/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import torch
from packaging import version

if version.parse(torch.__version__) >= version.parse('2.0.0'):
from einops._torch_specific import allow_ops_in_compiled_graph
allow_ops_in_compiled_graph()

from dalle2_pytorch.version import __version__
from dalle2_pytorch.dalle2_pytorch import DALLE2, DiffusionPriorNetwork, DiffusionPrior, Unet, Decoder
from dalle2_pytorch.dalle2_pytorch import OpenAIClipAdapter, OpenClipAdapter
Expand Down
2 changes: 1 addition & 1 deletion dalle2_pytorch/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.14.0'
__version__ = '1.14.2'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
'clip-anytorch>=2.5.2',
'coca-pytorch>=0.0.5',
'ema-pytorch>=0.0.7',
'einops>=0.6',
'einops>=0.6.1',
'embedding-reader',
'kornia>=0.5.4',
'numpy',
Expand Down

0 comments on commit 00e07b7

Please sign in to comment.