continue-revolution / sd-webui-segment-anything

Segment Anything for Stable Diffusion WebUI
3.36k stars 202 forks source link

[Feature]: Add Alpha Matting #129

Open SpenserCai opened 1 year ago

SpenserCai commented 1 year ago

Expected behavior

Hope to migrate the Alpha Matting from Rembg.

This feature is already well used in stable-diffusion-webui-rembg

Not use Alpha Matting image

Use Alpha Matting image

image

continue-revolution commented 1 year ago

What's the difference?

SpenserCai commented 1 year ago

When not in use, there will be obvious white edges. After use, there will be no white edges (you can clearly see this from the head of the figure in the picture). The role of alpha matting is to add transparent blur as a transition. It has a good optimization effect for very delicate objects such as Tennis racquet , hair.

SpenserCai commented 1 year ago

so in Rembg has alpha matting and stable-diffusion-webui-rembg also implemented it