From 75f1210a0c55397b99b5968865ba7eaddef0ed1b Mon Sep 17 00:00:00 2001 From: Antoine Bouthors Date: Thu, 9 Mar 2023 22:55:36 +1300 Subject: [PATCH] =?UTF-8?q?Fixed=20incorrect=20width/height=20assignment?= =?UTF-8?q?=20in=20StableDiffusionDepth2ImgPi=E2=80=A6=20(#2558)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed incorrect width/height assignment in StableDiffusionDepth2ImgPipeline when passing in tensor --- .../stable_diffusion/pipeline_stable_diffusion_depth2img.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py index 6c02e06a65..9087064ae0 100644 --- a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py +++ b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py @@ -447,7 +447,7 @@ class StableDiffusionDepth2ImgPipeline(DiffusionPipeline): if isinstance(image[0], PIL.Image.Image): width, height = image[0].size else: - width, height = image[0].shape[-2:] + height, width = image[0].shape[-2:] if depth_map is None: pixel_values = self.feature_extractor(images=image, return_tensors="pt").pixel_values