Unverified Commit 79c380bc authored by Vinh H. Pham's avatar Vinh H. Pham Committed by GitHub
Browse files

Correct how apply_overlay read crop_coords (#6417)

correct reading variables
parent e30b6614
...@@ -634,7 +634,9 @@ class VaeImageProcessor(ConfigMixin): ...@@ -634,7 +634,9 @@ class VaeImageProcessor(ConfigMixin):
init_image_masked = init_image_masked.convert("RGBA") init_image_masked = init_image_masked.convert("RGBA")
if crop_coords is not None: 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)) base_image = PIL.Image.new("RGBA", (width, height))
image = self.resize(image, height=h, width=w, resize_mode="crop") image = self.resize(image, height=h, width=w, resize_mode="crop")
base_image.paste(image, (x, y)) base_image.paste(image, (x, y))
......
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