Acly / krita-ai-diffusion

Streamlined interface for generating images with AI in Krita. Inpaint and outpaint with optional text prompt, no tweaking required.
GNU General Public License v3.0
5.63k stars 252 forks source link

Rembg #12

Open hansnolte opened 9 months ago

hansnolte commented 9 months ago

Hi Acly,

your plugin looks great!

Is it possible to retrofit Rembg (Remove Background)? Or are you planning to install Rembg? https://github.com/AUTOMATIC1111/stable-diffusion-webui-rembg

At ComfyUI has also been asked for Würstchen, which would then give a huge speed boost. https://github.com/comfyanonymous/ComfyUI/issues/1516

Many greetings Hans

Acly commented 9 months ago

Removing background would definitely be nice to have in Krita. But it's a useful tool on its own, and I don't see a good reason to include it in this repo. It doesn't even use the same inference backend as Comfy so there is little synergy - users only interested in background removal would have to download ~2GB PyTorch and run a server they don't need.

It would fit quite well here: https://github.com/Acly/krita-ai-tools This already provides object segmentation which you can use for background removal. But it's single object selection and doesn't support precise alpha at borders. Adding isnet model or some others used by Rembg could be useful.

Würstchen: I've seen it, looks interesting. Speed is definitely a hurdle. But it requires some investment I think, SD took quite some time & effort to arrive at the quality and flexibility.

hansnolte commented 9 months ago

Hello Acly, thank you for your fast feedback.

...would have to download ~2GB PyTorch and run a server they don't need. Of course you're right, that's a bit too much.

https://github.com/Acly/krita-ai-tools That looks interesting, I'll take a look. To bad that it doesn't support precise alpha. But might be useful for simple things.

Looking forward to how it goes with your Plugin further!

Bye Hans

ricewind100 commented 7 months ago

using krita ai tool image image

b4zz4 commented 6 months ago

With ClipSeg they are clip-based models that allow to create masks. For example "wall and floor" is like rembg

https://github.com/timojl/clipseg

agoulddesign commented 1 week ago

I use online background removal tools a lot so I made a plugin that uses BriaAI's API to remove backgrounds directly in Krita if anyone is interested. They have a free tier with 1000 uses per month. (I'm not in any way affiliated with them)

https://github.com/agoulddesign/krita-bg-remove-bria