diff --git a/predict.py b/predict.py index 8450cd7..eba4904 100644 --- a/predict.py +++ b/predict.py @@ -50,17 +50,7 @@ def predict( default=None, ), 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, + 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", @@ -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,