From 990b7da70183f0df6199670f3fcff573ff4c64fe Mon Sep 17 00:00:00 2001 From: Brett Kuprel Date: Mon, 4 Jul 2022 22:05:32 -0400 Subject: [PATCH] update cogrun.py --- cogrun.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/cogrun.py b/cogrun.py index 0068bf1..570686e 100644 --- a/cogrun.py +++ b/cogrun.py @@ -29,12 +29,12 @@ class Predictor(BasePredictor): intermediate_image_count: int = Input( description='Set the number of intermediate images to show while running', choices=[1, 2, 4, 8, 16], - default=8 + default=4 ), supercondition_factor: int = Input( description='Lower results in a wider variety of images but less agreement with the text', choices=[2, 4, 8, 16, 32, 64], - default=8 + default=16 ), ) -> Iterator[Path]: image_stream = self.model.generate_image_stream( @@ -46,7 +46,10 @@ class Predictor(BasePredictor): is_verbose=True ) + iter = 0 + path = Path(tempfile.mkdtemp()) for image in image_stream: - path = Path(tempfile.mkdtemp()) / 'output.jpg' - image.save(str(path)) - yield path \ No newline at end of file + iter += 1 + image_path = path / 'min-dalle-iter-{}.jpg'.format(iter) + image.save(str(image_path)) + yield image_path \ No newline at end of file