IOPaint/README.md

62 lines
2.3 KiB
Markdown
Raw Permalink Normal View History

2024-08-20 21:33:21 +02:00
<h1 align="center">Image Sorter InPaint</h1>
2024-01-21 16:25:50 +01:00
<p align="center">A free and open-source inpainting & outpainting tool powered by SOTA AI model.</p>
2022-07-22 17:20:12 +02:00
2024-02-09 08:30:00 +01:00
2022-07-22 17:20:12 +02:00
## Quick Start
2021-11-15 08:22:34 +01:00
2024-08-20 22:48:30 +02:00
### Prerequisites
First you have to install Python3 and pip.
2024-08-20 22:50:36 +02:00
In Linux run this command: `apt update && apt upgrade -y && apt install python3 python3-pip -y`
For Windows, read this Links: [Install Python on Windows](https://www.geeksforgeeks.org/how-to-install-python-on-windows/) & [Install PIP on Windows](https://www.geeksforgeeks.org/how-to-install-pip-on-windows/)
2024-08-20 22:48:30 +02:00
2024-01-24 15:21:47 +01:00
### Start webui
2024-08-20 22:48:30 +02:00
Image Sorter InPaint provides a convenient webui for using the latest AI models to edit your images.
You can install and start Image Sorter InPaint easily by running following command:
2022-10-05 17:15:09 +02:00
2022-04-18 16:40:23 +02:00
```bash
2024-08-20 22:48:30 +02:00
pip install opencv-python-headless
pip install "https://git.kmpr.at/kamp/IOPaint/releases/download/1.3.3/Image_Sorter_InPaint-1.3.3-py3-none-any.whl"
imagesorter-inpaint start --model=lama --device=cpu --host 0.0.0.0 --port=8080
2022-04-18 16:40:23 +02:00
```
2024-08-20 20:47:24 +02:00
That's it, you can start using Imagesorter InPaint by visiting http://localhost:8080 in your web browser.
2022-11-21 07:02:44 +01:00
2024-03-07 04:56:00 +01:00
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](https://www.iopaint.com/install/download_model)
You can see other supported models at [here](https://www.iopaint.com/models) and how to use local sd ckpt/safetensors file at [here](https://www.iopaint.com/models#load-ckptsafetensors).
2024-02-09 08:30:00 +01:00
2024-03-04 02:28:23 +01:00
## Development
Install [nodejs](https://nodejs.org/en), then install the frontend dependencies.
2024-03-04 02:28:23 +01:00
```bash
2024-08-20 20:47:24 +02:00
git clone https://git.kmpr.at/kamp/IOPaint.git
2024-03-04 02:28:23 +01:00
cd IOPaint/web_app
npm install
npm run build
2024-08-20 22:48:30 +02:00
cp -r dist/ ../inpaint/web_app
2024-03-04 02:28:23 +01:00
```
2024-04-01 03:27:50 +02:00
Create a `.env.local` file in `web_app` and fill in the backend IP and port.
```
VITE_BACKEND=http://127.0.0.1:8080
```
2024-03-04 02:28:23 +01:00
Start front-end development environment
```bash
2024-08-20 20:49:33 +02:00
npm run dev -- --host
2024-03-04 02:28:23 +01:00
```
Install back-end requirements and start backend service
2024-03-04 02:28:23 +01:00
```bash
2024-03-04 02:29:47 +01:00
pip install -r requirements.txt
2024-08-20 22:48:30 +02:00
pip install opencv-python-headless
2024-05-03 21:32:35 +02:00
python3 main.py start --model lama --port 8080
2024-03-04 02:28:23 +01:00
```
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.