-
Couldn't load subscription status.
- Fork 6.5k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
In the same vein as #2558
StableDiffusionControlNetPipeline gets width and height wrong in _default_height_width (https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_controlnet.py#L692):
height = image.shape[3]
width = image.shape[2]
Should be
height = image.shape[-2]
width = image.shape[-1]
(I recommend using negative shape indices so the code can work on BxCxHxW layout as well as CxHxW layout)
Reproduction
Pass a non-square image to StableDiffusionControlNetPipeline
Logs
No response
System Info
Any
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working