1
0
Fork 0

fix(api): check image size before blending

This commit is contained in:
Sean Sube 2023-01-18 08:29:55 -06:00
parent d6f2c626f6
commit 08dbc0c738
1 changed files with 5 additions and 1 deletions

View File

@ -182,7 +182,11 @@ def run_inpaint_pipeline(
num_inference_steps=params.steps,
width=size.width,
).images[0]
image = ImageChops.blend(source_image, image, strength)
if image.size == source_image.size:
image = ImageChops.blend(source_image, image, strength)
else:
print('output image size does not match source, skipping post-blend')
if upscale.faces or upscale.scale > 1:
image = upscale_resrgan(ctx, upscale, image)