mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
remove experimental "blur" infill
It seems counterproductive for use with the inpainting model, and not especially useful otherwise.
This commit is contained in:
parent
d627cd1865
commit
6556b200b5
@ -22,7 +22,6 @@ def infill_methods()->list[str]:
|
|||||||
methods = [
|
methods = [
|
||||||
"tile",
|
"tile",
|
||||||
"solid",
|
"solid",
|
||||||
"blur"
|
|
||||||
]
|
]
|
||||||
if PatchMatch.patchmatch_available():
|
if PatchMatch.patchmatch_available():
|
||||||
methods.insert(0, 'patchmatch')
|
methods.insert(0, 'patchmatch')
|
||||||
@ -214,11 +213,6 @@ class Inpaint(Img2Img):
|
|||||||
elif infill_method == 'solid':
|
elif infill_method == 'solid':
|
||||||
solid_bg = PIL.Image.new("RGBA", init_image.size, (0x7F, 0x7F, 0x7F, 0xFF))
|
solid_bg = PIL.Image.new("RGBA", init_image.size, (0x7F, 0x7F, 0x7F, 0xFF))
|
||||||
init_filled = PIL.Image.alpha_composite(solid_bg, init_image)
|
init_filled = PIL.Image.alpha_composite(solid_bg, init_image)
|
||||||
elif infill_method == 'blur':
|
|
||||||
solid_bg = PIL.Image.new("RGBA", init_image.size, (0x7F, 0x7F, 0x7F, 0xFF))
|
|
||||||
non_transparent = PIL.Image.alpha_composite(solid_bg, init_image)
|
|
||||||
blurred = non_transparent.copy().filter(ImageFilter.GaussianBlur(radius=mask_blur_radius))
|
|
||||||
init_filled = PIL.Image.alpha_composite(non_transparent, blurred)
|
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"Non-supported infill type {infill_method}", infill_method)
|
raise ValueError(f"Non-supported infill type {infill_method}", infill_method)
|
||||||
init_filled.paste(init_image, (0,0), init_image.split()[-1])
|
init_filled.paste(init_image, (0,0), init_image.split()[-1])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user