zhiweili
commited on
Commit
•
3f78507
1
Parent(s):
3f4f6cb
fix composite error
Browse files
inversion_run_adapter_blur.py
CHANGED
@@ -172,10 +172,9 @@ def run(
|
|
172 |
cond_image = [lineart_image, canny_image]
|
173 |
conditioning_scale = [lineart_scale, canny_scale]
|
174 |
|
|
|
175 |
blur = ImageFilter.GaussianBlur(blur_radius)
|
176 |
-
|
177 |
-
blur_mask_image = mask_image.filter(blur)
|
178 |
-
input_image = input_image.paste(blur_input_image, (0, 0), blur_mask_image)
|
179 |
|
180 |
pipeline.__call__ = partial(
|
181 |
pipeline.__call__,
|
|
|
172 |
cond_image = [lineart_image, canny_image]
|
173 |
conditioning_scale = [lineart_scale, canny_scale]
|
174 |
|
175 |
+
mask_image = mask_image.convert("L")
|
176 |
blur = ImageFilter.GaussianBlur(blur_radius)
|
177 |
+
input_image = Image.composite(input_image.filter(blur), input_image, mask_image.filter(blur))
|
|
|
|
|
178 |
|
179 |
pipeline.__call__ = partial(
|
180 |
pipeline.__call__,
|