From 97d22f0fdd716cc8ef15c8af658d4758fec05413 Mon Sep 17 00:00:00 2001 From: Brett Kuprel Date: Mon, 4 Jul 2022 17:46:31 -0400 Subject: [PATCH] handle log2_mid_count=0 --- min_dalle/min_dalle.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/min_dalle/min_dalle.py b/min_dalle/min_dalle.py index a202501..b02a6f6 100644 --- a/min_dalle/min_dalle.py +++ b/min_dalle/min_dalle.py @@ -206,7 +206,7 @@ class MinDalle: attention_state, image_tokens ) - if handle_intermediate_image is not None: + if handle_intermediate_image is not None and log2_mid_count > 0: if ((row_index + 1) * (2 ** log2_mid_count)) % row_count == 0: tokens = image_tokens[:, 1:] image = self.image_from_tokens(grid_size, tokens, is_verbose) diff --git a/setup.py b/setup.py index 2fc9f56..c326523 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name='min-dalle', description = 'min(DALLĀ·E)', long_description=(Path(__file__).parent / "README.rst").read_text(), - version='0.2.22', + version='0.2.23', author='Brett Kuprel', author_email='brkuprel@gmail.com', url='https://github.com/kuprel/min-dalle',