Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
7447f75b
Unverified
Commit
7447f75b
authored
Mar 31, 2023
by
Patrick von Platen
Committed by
GitHub
Mar 31, 2023
Browse files
Update pipeline_stable_diffusion_controlnet.py (#2917)
parent
a5bdb678
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_controlnet.py
.../stable_diffusion/pipeline_stable_diffusion_controlnet.py
+2
-2
No files found.
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_controlnet.py
View file @
7447f75b
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment