diff --git a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_controlnet.py b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_controlnet.py index 93cbc03b12ed..b8272a4ef3d6 100644 --- a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_controlnet.py +++ b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_controlnet.py @@ -698,7 +698,7 @@ def _default_height_width(self, height, width, image): if isinstance(image, PIL.Image.Image): height = image.height elif isinstance(image, torch.Tensor): - height = image.shape[3] + height = image.shape[2] height = (height // 8) * 8 # round down to nearest multiple of 8 @@ -706,7 +706,7 @@ def _default_height_width(self, height, width, image): if isinstance(image, PIL.Image.Image): width = image.width elif isinstance(image, torch.Tensor): - width = image.shape[2] + width = image.shape[3] width = (width // 8) * 8 # round down to nearest multiple of 8