Coder Social home page Coder Social logo

williamqf-ai / iopaint Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sanster/iopaint

0.0 0.0 0.0 22.34 MB

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.

Home Page: https://www.iopaint.com/

License: Apache License 2.0

Shell 0.13% JavaScript 0.17% Python 81.74% TypeScript 17.70% CSS 0.15% HTML 0.02% Batchfile 0.08%

iopaint's Introduction

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)
IOPaint-erase-markdown.mp4
iopaint-inpaint-markdown.mp4
Draw Text(AnyText) Out-painting(PowerPaint)
AnyText-markdown.mp4
outpainting.mp4

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 --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 front-end dependencies.

git clone https://github.com/Sanster/IOPaint.git
cd IOPaint/web_app
npm install

Start front-end development environment

npm run dev

Install back-end requirements and start back-end service

pip install -r requirements.txt
python3 main.py --model lama

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

iopaint's People

Contributors

sanster avatar blessedcoolant avatar loretoparisi avatar fiskbil avatar davidbejarcaceres avatar eltociear avatar aminejava avatar bediryilmaz avatar jojje avatar niek avatar linuxsuren avatar romixerr avatar callmepantoine avatar targaryen avatar

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.