docs: make Chinese README the default
This commit is contained in:
@@ -1,41 +1,47 @@
|
||||
<!-- WEHUB_ZH_README -->
|
||||
> [!NOTE]
|
||||
> 本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。
|
||||
> [English](./README.en.md) · [原始项目](https://github.com/Sanster/IOPaint) · [上游 README](https://github.com/Sanster/IOPaint/blob/HEAD/README.md)
|
||||
> 原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。
|
||||
|
||||
<h1 align="center">IOPaint</h1>
|
||||
<p align="center">A free and open-source inpainting & outpainting tool powered by SOTA AI model.</p>
|
||||
<p align="center">一款由 SOTA AI 模型驱动的免费开源 inpainting(图像修复)与 outpainting(图像扩展)工具。</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/Sanster/IOPaint">
|
||||
<img alt="total download" src="https://pepy.tech/badge/iopaint" />
|
||||
<img alt="总下载量" src="https://pepy.tech/badge/iopaint" />
|
||||
</a>
|
||||
<a href="https://pypi.org/project/iopaint">
|
||||
<img alt="version" src="https://img.shields.io/pypi/v/iopaint" />
|
||||
<img alt="版本" src="https://img.shields.io/pypi/v/iopaint" />
|
||||
</a>
|
||||
<a href="">
|
||||
<img alt="python version" src="https://img.shields.io/pypi/pyversions/iopaint" />
|
||||
<img alt="Python 版本" src="https://img.shields.io/pypi/pyversions/iopaint" />
|
||||
</a>
|
||||
<a href="https://huggingface.co/spaces/Sanster/iopaint-lama">
|
||||
<img alt="HuggingFace Spaces" src="https://img.shields.io/badge/%F0%9F%A4%97%20HuggingFace-Spaces-blue" />
|
||||
</a>
|
||||
<a href="https://colab.research.google.com/drive/1TKVlDZiE3MIZnAUMpv2t_S4hLr6TUY1d?usp=sharing">
|
||||
<img alt="Open in Colab" src="https://colab.research.google.com/assets/colab-badge.svg" />
|
||||
<img alt="在 Colab 中打开" src="https://colab.research.google.com/assets/colab-badge.svg" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|Erase([LaMa](https://www.iopaint.com/models/erase/lama))|Replace Object([PowerPaint](https://www.iopaint.com/models/diffusion/powerpaint))|
|
||||
|擦除([LaMa](https://www.iopaint.com/models/erase/lama))|Replace|对象([PowerPaint](https://www.iopaint.com/models/diffusion/powerpaint))|
|
||||
|-----|----|
|
||||
|<video src="https://github.com/Sanster/IOPaint/assets/3998421/264bc27c-0abd-4d8b-bb1e-0078ab264c4a"> | <video src="https://github.com/Sanster/IOPaint/assets/3998421/1de5c288-e0e1-4f32-926d-796df0655846">|
|
||||
|
||||
|Draw Text([AnyText](https://www.iopaint.com/models/diffusion/anytext))|Out-painting([PowerPaint](https://www.iopaint.com/models/diffusion/powerpaint))|
|
||||
|绘制文字([AnyText](https://www.iopaint.com/models/diffusion/anytext))|Out-painting([PowerPaint](https://www.iopaint.com/models/diffusion/powerpaint))|
|
||||
|---------|-----------|
|
||||
|<video src="https://github.com/Sanster/IOPaint/assets/3998421/ffd4eda4-f7d4-4693-93d8-d2cd5aa7c6d6">|<video src="https://github.com/Sanster/IOPaint/assets/3998421/c4af8aef-8c29-49e0-96eb-0aae2f768da2">|
|
||||
|
||||
|
||||
## Features
|
||||
## 功能特性
|
||||
|
||||
- Completely free and open-source, fully self-hosted, support CPU & GPU & Apple Silicon
|
||||
- [Windows 1-Click Installer](https://www.iopaint.com/install/windows_1click_installer)
|
||||
- [OptiClean](https://apps.apple.com/ca/app/opticlean/id6452387177): macOS & iOS App for object erase
|
||||
- Supports various AI [models](https://www.iopaint.com/models) to perform erase, inpainting or outpainting task.
|
||||
- [Erase models](https://www.iopaint.com/models#erase-models): These models can be used to remove unwanted object, defect, watermarks, people from image.
|
||||
- Diffusion models: These models can be used to replace objects or perform outpainting. Some popular used models include:
|
||||
- 完全免费且开源,可完全自托管,支持 CPU、GPU 与 Apple Silicon
|
||||
- [Windows 一键安装程序](https://www.iopaint.com/install/windows_1click_installer)
|
||||
- [OptiClean](https://apps.apple.com/ca/app/opticlean/id6452387177): 适用于 macOS 与 iOS 的对象擦除 App
|
||||
- 支持多种 AI [models](https://www.iopaint.com/models) 以执行擦除、inpainting 或 outpainting 任务。
|
||||
- [Erase models](https://www.iopaint.com/models#erase-models): 这些模型可用于从图像中移除不需要的对象、瑕疵、水印或人物。
|
||||
- Diffusion models:这些模型可用于替换对象或执行 outpainting。一些常用的模型包括:
|
||||
- [runwayml/stable-diffusion-inpainting](https://huggingface.co/runwayml/stable-diffusion-inpainting)
|
||||
- [diffusers/stable-diffusion-xl-1.0-inpainting-0.1](https://huggingface.co/diffusers/stable-diffusion-xl-1.0-inpainting-0.1)
|
||||
- [andregn/Realistic_Vision_V3.0-inpainting](https://huggingface.co/andregn/Realistic_Vision_V3.0-inpainting)
|
||||
@@ -47,21 +53,21 @@
|
||||
- [Fantasy-Studio/Paint-by-Example](https://huggingface.co/Fantasy-Studio/Paint-by-Example)
|
||||
|
||||
- [Plugins](https://www.iopaint.com/plugins):
|
||||
- [Segment Anything](https://iopaint.com/plugins/interactive_seg): Accurate and fast Interactive Object Segmentation
|
||||
- [RemoveBG](https://iopaint.com/plugins/rembg): Remove image background or generate masks for foreground objects
|
||||
- [Anime Segmentation](https://iopaint.com/plugins/anime_seg): Similar to RemoveBG, the model is specifically trained for anime images.
|
||||
- [RealESRGAN](https://iopaint.com/plugins/RealESRGAN): Super Resolution
|
||||
- [GFPGAN](https://iopaint.com/plugins/GFPGAN): Face Restoration
|
||||
- [RestoreFormer](https://iopaint.com/plugins/RestoreFormer): Face Restoration
|
||||
- [FileManager](https://iopaint.com/file_manager): Browse your pictures conveniently and save them directly to the output directory.
|
||||
- [Segment Anything](https://iopaint.com/plugins/interactive_seg): 精准且快速的交互式对象分割
|
||||
- [RemoveBG](https://iopaint.com/plugins/rembg): 移除图像背景或为前景对象生成遮罩
|
||||
- [Anime Segmentation](https://iopaint.com/plugins/anime_seg): 与 RemoveBG 类似,该模型专门针对动漫图像训练。
|
||||
- [RealESRGAN](https://iopaint.com/plugins/RealESRGAN): 超分辨率
|
||||
- [GFPGAN](https://iopaint.com/plugins/GFPGAN): 人脸修复
|
||||
- [RestoreFormer](https://iopaint.com/plugins/RestoreFormer): 人脸修复
|
||||
- [FileManager](https://iopaint.com/file_manager): 便捷浏览图片,并直接保存到输出目录。
|
||||
|
||||
|
||||
## Quick Start
|
||||
## 快速开始
|
||||
|
||||
### Start webui
|
||||
### 启动 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:
|
||||
IOPaint 提供便捷的 webui,可使用最新 AI 模型编辑图像。
|
||||
运行以下命令即可轻松安装并启动 IOPaint:
|
||||
|
||||
```bash
|
||||
# In order to use GPU, install cuda version of pytorch first.
|
||||
@@ -73,25 +79,25 @@ 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.
|
||||
就这么简单,在浏览器中访问 http://localhost:8080 即可开始使用 IOPaint。
|
||||
|
||||
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)
|
||||
所有模型将在启动时自动下载。如需更改下载目录,可添加 `--model-dir`。更多文档见[此处](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).
|
||||
其他支持的模型见[此处](https://www.iopaint.com/models),本地 sd ckpt/safetensors 文件用法见[此处](https://www.iopaint.com/models#load-ckptsafetensors).
|
||||
|
||||
### 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`.
|
||||
启动服务时可指定要使用的插件,使用 `iopaint start --help` 可查看启用插件的命令。
|
||||
|
||||
More demonstrations of the Plugin can be seen [here](https://www.iopaint.com/plugins)
|
||||
更多插件演示见[此处](https://www.iopaint.com/plugins)
|
||||
|
||||
```bash
|
||||
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 批量处理图像:
|
||||
|
||||
```bash
|
||||
iopaint run --model=lama --device=cpu \
|
||||
@@ -100,14 +106,14 @@ iopaint run --model=lama --device=cpu \
|
||||
--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.
|
||||
`--image` 为包含输入图像的文件夹,`--mask` 为包含对应遮罩图像的文件夹。
|
||||
当 `--mask` 为遮罩文件路径时,所有图像都将使用该遮罩进行处理。
|
||||
|
||||
You can see more information about the available models and plugins supported by IOPaint below.
|
||||
下方可查看 IOPaint 支持的可用模型与插件的更多信息。
|
||||
|
||||
## Development
|
||||
## 开发
|
||||
|
||||
Install [nodejs](https://nodejs.org/en), then install the frontend dependencies.
|
||||
安装 [nodejs](https://nodejs.org/en), 后安装前端依赖。
|
||||
|
||||
```bash
|
||||
git clone https://github.com/Sanster/IOPaint.git
|
||||
@@ -117,22 +123,22 @@ 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.
|
||||
在 `web_app` 中创建 `.env.local` 文件,并填写后端 IP 与端口。
|
||||
```
|
||||
VITE_BACKEND=http://127.0.0.1:8080
|
||||
```
|
||||
|
||||
Start front-end development environment
|
||||
启动前端开发环境
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Install back-end requirements and start backend service
|
||||
安装后端依赖并启动后端服务
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
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.
|
||||
然后可访问 `http://localhost:5173/` 进行开发。
|
||||
修改前端代码后会自动更新,
|
||||
但修改 Python 代码后需要重启后端服务。
|
||||
|
||||
Reference in New Issue
Block a user