cog-sdxl
cog-sdxl copied to clipboard
Height and width issue with SDXL image to image
This issue is for stability-ai/sdxl model. When I use the model for img2img predictions and set custom width and height, the resulting output still follows the dimensions of the original image. For example I set the width to 1024 and height to 768 and the parameters are ignored. Can we add the width and height args to the img2img_pipe?
if image and mask:
print("inpainting mode")
sdxl_kwargs["image"] = self.load_image(image)
sdxl_kwargs["mask_image"] = self.load_image(mask)
sdxl_kwargs["strength"] = prompt_strength
sdxl_kwargs["width"] = width
sdxl_kwargs["height"] = height
pipe = self.inpaint_pipe
elif image:
print("img2img mode")
sdxl_kwargs["image"] = self.load_image(image)
sdxl_kwargs["strength"] = prompt_strength
pipe = self.img2img_pipe
else:
print("txt2img mode")
sdxl_kwargs["width"] = width
sdxl_kwargs["height"] = height
pipe = self.txt2img_pipe