Giter VIP home page Giter VIP logo

sd-webui-inpaint-background's Introduction

sd-webui-inpaint-background

Overview

A1111 extension that adds a new operation mode in the img2img tab. It finds a background mask using rembg.

Installation

  • Go to Extensions > Available
  • Click the Load from: button
  • Enter "inpaint background" in the search bar
  • Click the Install button of the "inpaint background" Tab cell
  • Restart the webui

Usage

  • Go to img2img -> Generation -> Inpaint background
  • Upload your Base image. The extension will generate a mask as soon as you upload it
  • Generate images

Additional options are added in the inpaint parameters.
You can play with them to select the background detection model and configure alpha matting.

sd-webui-inpaint-background's People

Contributors

pladselsker avatar w-e-w avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sd-webui-inpaint-background's Issues

Alpha matting settings don't do anything?

Hi,

Thank you for this contribution!

For some reason when I tick alpha matting setting on and try to make adjustments to the mask, they don't seem to do anything as they normally would with rembg

Am I missing something?

Which SD webui version is supported?

I got an error from webui forge version. Here is message:

Python 3.9.12 (main, Apr  5 2022, 06:56:58) 
[GCC 7.5.0]
Version: f0.0.1-1.7.0
Commit hash: <none>
Launching Web UI with arguments: --xformers --listen --enable-insecure-extension-access --api
Total VRAM 24260 MB, total RAM 1019411 MB
xformers version: 0.0.20
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3090 : native
VAE dtype: torch.bfloat16
Using xformers cross attention
==============================================================================
You are running torch 2.0.1+cu118.
The program is tested to work with torch 2.1.2.
To reinstall the desired version, run with commandline flag --reinstall-torch.
Beware that this will cause a lot of large files to be downloaded, as well as
there are reports of issues with training tab on the latest version.

Use --skip-version-check commandline argument to disable this check.
==============================================================================
=================================================================================
You are running xformers 0.0.20.
The program is tested to work with xformers 0.0.23.post1.
To reinstall the desired version, run with commandline flag --reinstall-xformers.

Use --skip-version-check commandline argument to disable this check.
=================================================================================
ControlNet preprocessor location: /mnt/data1/ml/webui/stable-diffusion-webui-forge/models/ControlNetPreprocessor
[-] ADetailer: Failed to load model 'face_yolov8n.pt' from huggingface
[-] ADetailer initialized. version: 24.4.2, num models: 16
[sdwi2iextender] Applying img2img patch
Loading weights [2d5af23726] from /mnt/data1/ml/webui/stable-diffusion-webui-forge/models/Stable-diffusion/realismEngineSDXL_v30VAE.safetensors
2024-05-07 09:14:53,352 - AnimateDiff - INFO - Injecting LCM to UI.
2024-05-07 09:14:53,941 - ControlNet - INFO - ControlNet UI callback registered.
2024-05-07 09:14:53,977 - AnimateDiff - INFO - Hacking i2i-batch.
Traceback (most recent call last):
  File "/mnt/data1/ml/webui/stable-diffusion-webui-forge/launch.py", line 48, in <module>
    main()
  File "/mnt/data1/ml/webui/stable-diffusion-webui-forge/launch.py", line 44, in main
    start()
  File "/mnt/data1/ml/webui/stable-diffusion-webui-forge/modules/launch_utils.py", line 512, in start
    webui.webui()
  File "/mnt/data1/ml/webui/stable-diffusion-webui-forge/webui.py", line 68, in webui
    shared.demo = ui.create_ui()
  File "/mnt/data1/ml/webui/stable-diffusion-webui-forge/modules/ui.py", line 1107, in create_ui
    loadsave = ui_loadsave.UiLoadsave(cmd_opts.ui_config_file)
  File "/mnt/data1/ml/webui/stable-diffusion-webui-forge/venv/lib/python3.9/site-packages/sdwi2iextender/lib/img2img_tab_extender.py", line 164, in hijack__init__
    Img2imgTabExtender.instantiate_custom_tabs()
  File "/mnt/data1/ml/webui/stable-diffusion-webui-forge/venv/lib/python3.9/site-packages/sdwi2iextender/lib/img2img_tab_extender.py", line 96, in instantiate_custom_tabs
    cls.setup_navigation_events(img2img_tabs)
  File "/mnt/data1/ml/webui/stable-diffusion-webui-forge/venv/lib/python3.9/site-packages/sdwi2iextender/lib/img2img_tab_extender.py", line 111, in setup_navigation_events
    block_data_iterator = zip(img2img_tabs, padded_tab_data_list, strict=True)
TypeError: zip() takes no keyword arguments
model_type EPS
UNet ADM Dimension 2816

Forge Version Support

Can you make it support SD WebUI Forge version? I guess that sd extender broke it, but not sure, never tried if before today.

Greetings

The tab is empty

I installed the extension according to the instructions, however, after switching to the Inpaint background tab in img2img, I saw that it was completely empty. The screenshot is attached below. What should I do?
Screenshot 2024-08-04 154756

incompatible

Win11 The plug-in is not displayed in the label bar after the system is installed Win11 系统不支持插件 安装好后 SD 界面不显示 经测试 win10最新版可用

API usage

How to use this extension as API?

Old sdwi2iextender version warns about a patch that will be removed when SD 1.9 is out (it's out)

[sdwi2iextender] Developper warning:
[sdwi2iextender] ./modules/img2img.py is being recompiled at run time with a patch. Your debugger will not work in this file.
[sdwi2iextender] If you need debug tools in this file, disable all extensions that use the sdwi2iextender library.
[sdwi2iextender] This patch is temporary and will be removed when v1.9 will be released.

sdwi2iextender should probably be updated to the latest version.

Error using img2img!

After the last update of the extension, this error started to appear when using img2img:

image

after uninstalling the extension everything went back to normal...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.