From 97cc1bce7af0c67050bcd7c24b49a4540b54679f Mon Sep 17 00:00:00 2001 From: Antoine Bouthors Date: Mon, 6 Mar 2023 13:52:13 +1300 Subject: [PATCH] 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 6c02e06a6523..9087064ae0b8 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 @@ def prepare_depth_map(self, image, depth_map, batch_size, do_classifier_free_gui 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