From 1f19e037c7c000c0b9edb9e08de33894b600e2c8 Mon Sep 17 00:00:00 2001 From: Chenxi Date: Sat, 17 Dec 2022 22:11:36 +0000 Subject: [PATCH 1/2] fix-input --- predict.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/predict.py b/predict.py index 8450cd7..eae17b0 100644 --- a/predict.py +++ b/predict.py @@ -52,16 +52,6 @@ def predict( image: Path = Input( description="Inital image to generate variations of.", ), - width: int = Input( - description="Width of output image. Maximum size is 1024x768 or 768x1024 because of memory limits", - choices=[128, 256, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960, 1024], - default=512, - ), - height: int = Input( - description="Height of output image. Maximum size is 1024x768 or 768x1024 because of memory limits", - choices=[128, 256, 384, 448, 512, 576, 640, 704, 768, 832, 896, 960, 1024], - default=512, - ), prompt_strength: float = Input( description="Prompt strength when providing the image. 1.0 corresponds to full destruction of information in init image", default=0.8, @@ -80,7 +70,14 @@ def predict( ), scheduler: str = Input( default="DPMSolverMultistep", - choices=["DDIM", "K_EULER", "DPMSolverMultistep", "K_EULER_ANCESTRAL", "PNDM", "KLMS"], + choices=[ + "DDIM", + "K_EULER", + "DPMSolverMultistep", + "K_EULER_ANCESTRAL", + "PNDM", + "KLMS", + ], description="Choose a scheduler.", ), seed: int = Input( @@ -102,6 +99,9 @@ def predict( generator = torch.Generator("cuda").manual_seed(seed) output = pipe( prompt=[prompt] * num_outputs if prompt is not None else None, + negative_prompt=[negative_prompt] * num_outputs + if negative_prompt is not None + else None, guidance_scale=guidance_scale, generator=generator, num_inference_steps=num_inference_steps, From 7bf089d89fcda9422a23631ddca1d13ac6434c8b Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Mon, 2 Jan 2023 16:43:56 -0800 Subject: [PATCH 2/2] update description of `image` input Update predict.py Update predict.py --- predict.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/predict.py b/predict.py index eae17b0..eba4904 100644 --- a/predict.py +++ b/predict.py @@ -50,7 +50,7 @@ def predict( default=None, ), image: Path = Input( - description="Inital image to generate variations of.", + description="A starting image from which to generate variations (aka 'img2img')" ), prompt_strength: float = Input( description="Prompt strength when providing the image. 1.0 corresponds to full destruction of information in init image",