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
79c380bc
Unverified
Commit
79c380bc
authored
Jan 03, 2024
by
Vinh H. Pham
Committed by
GitHub
Jan 02, 2024
Browse files
Correct how apply_overlay read crop_coords (#6417)
correct reading variables
parent
e30b6614
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
src/diffusers/image_processor.py
src/diffusers/image_processor.py
+3
-1
No files found.
src/diffusers/image_processor.py
View file @
79c380bc
...
...
@@ -634,7 +634,9 @@ class VaeImageProcessor(ConfigMixin):
init_image_masked
=
init_image_masked
.
convert
(
"RGBA"
)
if
crop_coords
is
not
None
:
x
,
y
,
w
,
h
=
crop_coords
x
,
y
,
x2
,
y2
=
crop_coords
w
=
x2
-
x
h
=
y2
-
y
base_image
=
PIL
.
Image
.
new
(
"RGBA"
,
(
width
,
height
))
image
=
self
.
resize
(
image
,
height
=
h
,
width
=
w
,
resize_mode
=
"crop"
)
base_image
.
paste
(
image
,
(
x
,
y
))
...
...
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