Skip to content

Commit

Permalink
make sure einops is 0.6.1 or greater and call allow_ops_in_compiled_g…
Browse files Browse the repository at this point in the history
…raph
  • Loading branch information
lucidrains committed Apr 20, 2023
1 parent 2edd8aa commit 426eb34
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions imagen_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 imagen_pytorch.imagen_pytorch import Imagen, Unet
from imagen_pytorch.imagen_pytorch import NullUnet
from imagen_pytorch.imagen_pytorch import BaseUnet64, SRUnet256, SRUnet1024
Expand Down
2 changes: 1 addition & 1 deletion imagen_pytorch/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.25.0'
__version__ = '1.25.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 @@
'beartype',
'click',
'datasets',
'einops>=0.6',
'einops>=0.6.1',
'ema-pytorch>=0.0.3',
'fsspec',
'kornia',
Expand Down

0 comments on commit 426eb34

Please sign in to comment.