stable-diffusion-webui-rembg
stable-diffusion-webui-rembg copied to clipboard
Update rembg dependency and add BiRefNet models in the list of available RemBG models
Hi,
The goal of this PR is to add BiRefNet models to the list of available remove background models. It follows discussion here and merged PR in rembg here.
The following modifications have been made:
- Force installation of the latest 2.0.59 version of
rembg
even if a previous one was already installed. - Add of a radio button allowing users to select either "Classic" models (it's the defaut option, which allows to use the same models as before my modifications) or "BiRefNet" models:
- Remove duplicate
isnet-general-use
entry from the list of classic models. - Add parameter
providers
when callingrembg
from UI or API with onlyCUDAExecutionProvider
andCPUExecutionProvider
as by default all available providers may be used, for instanceTensorrtExecutionProvider
orAzureExecutionProvider
, even if no external dependency is installed with this extension, leading to an error message in the console. Internally,rembg
will removeCUDAExecutionProvider
from its list of providers if it's not an available provider (cf. here). - Update README file accordingly to this PR modifications.
- Add .vscode folder to .gitignore to avoid development environment configuration pollution.
Please let me know if I need to make any changes.