seakingii / sd-webui-roop

roop extension for StableDiffusion web-ui

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

roop for StableDiffusion

This is an extension for StableDiffusion's AUTOMATIC1111 web-ui that allows face-replacement in images. It is based on roop but will be developed seperately.

example

Disclaimer

This software is meant to be a productive contribution to the rapidly growing AI-generated media industry. It will help artists with tasks such as animating a custom character or using the character as a model for clothing etc.

The developers of this software are aware of its possible unethical applicaitons and are committed to take preventative measures against them. It has a built-in check which prevents the program from working on inappropriate media including but not limited to nudity, graphic content, sensitive material such as war footage etc. We will continue to develop this project in the positive direction while adhering to law and ethics. This project may be shut down or include watermarks on the output if requested by law.

Users of this software are expected to use this software responsibly while abiding the local law. If face of a real person is being used, users are suggested to get consent from the concerned person and clearly mention that it is a deepfake when posting content online. Developers of this software will not be responsible for actions of end-users.

Installation

To install the extension, follow these steps:

  • In web-ui, go to the "Extensions" tab and use this URL https://github.com/s0md3v/sd-webui-roop in the "install from URL" tab.
  • Download the "inswapper_128.onnx" model from here and put it inside <web-ui-dir>/extensions/roop/models directory.

On Windows, Microsoft Visual C++ 14.0 or greater must be installed before installing the extension. During the install, make sure to include the Python and C++ packages.

Usage

  1. Under "roop" drop-down menu, import an image containing a face.
  2. Turn on the "Enable" checkbox
  3. That's it, now the generated result will have the face you selected

The result face is blurry

Use the "Restore Face" option. You can also try the "Upscaler" option or for more finer control, use an upscaler from the "Extras" tab.

There are multiple faces in result

Select the face numbers you wish to swap using the "Comma separated face number(s)" option.

The result is totally black

This means roop detected that your image is NSFW.

Img2Img

You can choose to activate the swap on the source image or on the generated image, or on both using the checkboxes. Activating on source image allows you to start from a given base and apply the diffusion process to it.

Inpainting should work but only the masked part will be swapped.

About

roop extension for StableDiffusion web-ui

License:GNU Affero General Public License v3.0


Languages

Language:Python 100.0%