Skip to content

Commit

Permalink
handle open clip adapter image size being a tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Sep 19, 2022
1 parent 86e2d5b commit d0c11b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion dalle2_pytorch/dalle2_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,10 @@ def dim_latent(self):

@property
def image_size(self):
return self.clip.visual.image_size
image_size = self.clip.visual.image_size
if isinstance(image_size, tuple):
return max(image_size)
return image_size

@property
def image_channels(self):
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.10.5'
__version__ = '1.10.6'

0 comments on commit d0c11b3

Please sign in to comment.