Unverified Commit a3476d5b authored by YiYi Xu's avatar YiYi Xu Committed by GitHub
Browse files

Controlnet Img2img: pass `height` and `width` to `image_processor.preprocess` (#5665)



pass height and width to image_processor.preprocess
Co-authored-by: default avataryiyixuxu <yixu310@gmail,com>
parent 1477865e
......@@ -996,7 +996,7 @@ class StableDiffusionControlNetImg2ImgPipeline(
prompt_embeds = torch.cat([negative_prompt_embeds, prompt_embeds])
# 4. Prepare image
image = self.image_processor.preprocess(image).to(dtype=torch.float32)
image = self.image_processor.preprocess(image, height=height, width=width).to(dtype=torch.float32)
# 5. Prepare controlnet_conditioning_image
if isinstance(controlnet, ControlNetModel):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment