Acly / krita-ai-diffusion

Streamlined interface for generating images with AI in Krita. Inpaint and outpaint with optional text prompt, no tweaking required.
https://www.interstice.cloud
GNU General Public License v3.0
6.96k stars 343 forks source link

Rembg #12

Open hansnolte opened 1 year ago

hansnolte commented 1 year 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 1 year 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 1 year 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 1 year ago

using krita ai tool image image

b4zz4 commented 11 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 5 months 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

tonynoce commented 1 month ago

Hi all ! bumping this up since development in rembg has been done, is it possible to include it now ?

I dont know if there are core nodes with it but there is an implementation with the nodes of Essentials from CubiQ

I do see an use for this since there are several free alternatives with good outputs.

Thanks !

Luury commented 3 weeks ago

BUMP! I was really in need of a solution like this already included

Like this: https://github.com/AUTOMATIC1111/stable-diffusion-webui-rembg