项目简介
- 轻松删除图像中的不需要的对象、瑕疵和水印
- 对图像特定区域进行修改、添加新
元素或替换内容
- 自动扩展图像尺寸,生成新像素填充空白区域
这款开源工具功能强大,操作简单,是您图像处理的得力助手。赶快试试吧!
快速上手
启动 webui
IOPaint 提供了一个方便的 webui,用于使用最新的 AI 模型来编辑您的图像。您可以通过运行以下命令轻松安装和启动 IOPaint:
# 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
就是这样,您可以通过访问 Web 浏览器中的 http://localhost:8080 来开始使用 IOPaint。
所有模型将在启动时自动下载。如果要更改下载目录,可以添加 --model-dir .更多文档可以在这里找到
您可以在此处查看其他支持的模型,以及如何在此处查看本地 sd ckpt/safetensors 文件。
插件
您可以指定在启动服务时要使用的插件,并且可以使用 查看启用 iopaint start --help 插件的命令。
可以在此处查看该插件的更多演示
iopaint start --enable-interactive-seg --interactive-seg-device=cuda
批处理
您还可以在命令行中使用 IOPaint 来批处理映像:
iopaint run --model=lama --device=cpu \
--image=/path/to/image_folder \
--mask=/path/to/mask_folder \
--output=output_dir
--image 是包含输入图像的文件夹, --mask 是包含相应蒙版图像的文件夹。当是蒙版文件的路径时 --mask ,所有图像都将使用此蒙版进行处理。