Home

Awesome

BiRefNet background removal for Stable Diffusion WebUI

This extension is for AUTOMATIC1111's Stable Diffusion web UI, it allows to add a BiRefNet section to the original Stable Diffusion WebUI's Extras tab to benefit from BiRefNet background removal feature.

image

Find the UI for BiRefNet background removal in the Extras tab after installing the extension.

Installation

  1. Open "Extensions" tab.
  2. Open "Install from URL" tab in the tab.
  3. Enter https://github.com/dimitribarbot/sd-webui-birefnet.git to "URL for extension's git repository".
  4. Press "Install" button.
  5. It may take a few minutes to install the extension. At the end, you will see the message "Installed into stable-diffusion-webui\extensions\sd-webui-birefnet. Use Installed tab to restart".
  6. Go to "Installed" tab, click "Check for updates", and then click "Apply and restart UI". (The next time you can also use these buttons to update this extension.)

Models

The available models are:

Model files go here (automatically downloaded if the folder is not present during first run): stable-diffusion-webui/models/birefnet.

If necessary, they can be downloaded from:

API

Routes have been added to the Automatic1111's SD WebUI API:

Both endpoints share these parameters:

Additional parameters for the /birefnet/single endpoint are:

Additional parameters for the /birefnet/multi endpoint are:

Thanks

Original author's link: https://github.com/ZhengPeng7/BiRefNet