Unverified Commit 7447f75b authored by Patrick von Platen's avatar Patrick von Platen Committed by GitHub
Browse files

Update pipeline_stable_diffusion_controlnet.py (#2917)

parent a5bdb678
...@@ -698,7 +698,7 @@ class StableDiffusionControlNetPipeline(DiffusionPipeline, TextualInversionLoade ...@@ -698,7 +698,7 @@ class StableDiffusionControlNetPipeline(DiffusionPipeline, TextualInversionLoade
if isinstance(image, PIL.Image.Image): if isinstance(image, PIL.Image.Image):
height = image.height height = image.height
elif isinstance(image, torch.Tensor): elif isinstance(image, torch.Tensor):
height = image.shape[3] height = image.shape[2]
height = (height // 8) * 8 # round down to nearest multiple of 8 height = (height // 8) * 8 # round down to nearest multiple of 8
...@@ -706,7 +706,7 @@ class StableDiffusionControlNetPipeline(DiffusionPipeline, TextualInversionLoade ...@@ -706,7 +706,7 @@ class StableDiffusionControlNetPipeline(DiffusionPipeline, TextualInversionLoade
if isinstance(image, PIL.Image.Image): if isinstance(image, PIL.Image.Image):
width = image.width width = image.width
elif isinstance(image, torch.Tensor): elif isinstance(image, torch.Tensor):
width = image.shape[2] width = image.shape[3]
width = (width // 8) * 8 # round down to nearest multiple of 8 width = (width // 8) * 8 # round down to nearest multiple of 8
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment