We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d38c50c commit 1d2204dCopy full SHA for 1d2204d
src/diffusers/image_processor.py
@@ -795,13 +795,11 @@ def apply_overlay(
795
The final image with the overlay applied.
796
"""
797
798
- width, height = image.width, image.height
799
-
800
- init_image = self.resize(init_image, width=width, height=height)
801
- mask = self.resize(mask, width=width, height=height)
+ width, height = init_image.width, init_image.height
802
803
init_image_masked = PIL.Image.new("RGBa", (width, height))
804
init_image_masked.paste(init_image.convert("RGBA").convert("RGBa"), mask=ImageOps.invert(mask.convert("L")))
+
805
init_image_masked = init_image_masked.convert("RGBA")
806
807
if crop_coords is not None:
0 commit comments