1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

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

pass height and width to image_processor.preprocess

Co-authored-by: yiyixuxu <yixu310@gmail,com>
This commit is contained in:
YiYi Xu
2023-11-10 06:53:20 -10:00
committed by GitHub
parent 1477865e48
commit a3476d5bd6

View File

@@ -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):