Image inpainting tool powered by SOTA AI Model. Remove any unwanted object, defect, people from your pictures or erase and replace(powered by stable diffusion) any thing on your pictures.
Go to file
2024-08-20 20:36:06 +02:00
.github Update 🐛-bug-report.md 2024-05-14 09:18:11 +08:00
assets update readme 2024-01-24 22:21:47 +08:00
docker docker/GPUDockerfile gelöscht 2024-08-20 20:36:06 +02:00
iopaint add mask tab 2024-08-12 12:13:37 +08:00
scripts Create win_start_cn.bat 2024-05-18 15:52:24 +08:00
web_app Dateien nach "web_app/src" hochladen 2024-08-20 19:31:25 +02:00
.gitignore update gitignore 2024-01-05 15:21:25 +08:00
build_docker.sh update 2023-11-01 21:14:52 +08:00
LICENSE init 2021-11-15 22:21:01 +08:00
main.py rename to iopaint 2024-01-05 15:19:23 +08:00
publish.sh update publish.sh 2024-02-27 22:42:46 +08:00
README.md README.md aktualisiert 2024-08-20 19:50:40 +02:00
requirements-dev.txt update 2023-12-22 14:00:30 +08:00
requirements.txt 1.3.1 fix brushnet;requirements 2024-05-06 22:48:46 +08:00
setup.py 1.3.3 fix single file scan 2024-05-06 23:12:02 +08:00

IOPaint

A free and open-source inpainting & outpainting tool powered by SOTA AI model.

total download version python version HuggingFace Spaces Open in Colab

Erase(LaMa) Replace Object(PowerPaint)
Draw Text(AnyText) Out-painting(PowerPaint)

Features

Quick Start

Start webui

IOPaint provides a convenient webui for using the latest AI models to edit your images. You can install and start IOPaint easily by running following command:

# In order to use GPU, install cuda version of pytorch first.
# pip3 install torch==2.1.2 torchvision==0.16.2 --index-url https://download.pytorch.org/whl/cu118
# AMD GPU users, please utilize the following command, only works on linux, as pytorch is not yet supported on Windows with ROCm.
# pip3 install torch==2.1.2 torchvision==0.16.2 --index-url https://download.pytorch.org/whl/rocm5.6

pip3 install iopaint
iopaint start --model=lama --device=cpu --host 0.0.0.0 --port=8080

That's it, you can start using IOPaint by visiting http://localhost:8080 in your web browser.

All models will be downloaded automatically at startup. If you want to change the download directory, you can add --model-dir. More documentation can be found here

You can see other supported models at here and how to use local sd ckpt/safetensors file at here.

Plugins

You can specify which plugins to use when starting the service, and you can view the commands to enable plugins by using iopaint start --help.

More demonstrations of the Plugin can be seen here

iopaint start --enable-interactive-seg --interactive-seg-device=cuda

Batch processing

You can also use IOPaint in the command line to batch process images:

iopaint run --model=lama --device=cpu \
--image=/path/to/image_folder \
--mask=/path/to/mask_folder \
--output=output_dir

--image is the folder containing input images, --mask is the folder containing corresponding mask images. When --mask is a path to a mask file, all images will be processed using this mask.

You can see more information about the available models and plugins supported by IOPaint below.

Development

Install nodejs, then install the frontend dependencies.

git clone https://github.com/Sanster/IOPaint.git
cd IOPaint/web_app
npm install
npm run build
cp -r dist/ ../iopaint/web_app

Create a .env.local file in web_app and fill in the backend IP and port.

VITE_BACKEND=http://127.0.0.1:8080

Start front-end development environment

npm run dev

Install back-end requirements and start backend service

pip install -r requirements.txt
pip3 install opencv-python-headless
python3 main.py start --model lama --port 8080

Then you can visit http://localhost:5173/ for development. The frontend code will automatically update after being modified, but the backend needs to restart the service after modifying the python code.