AIGC大模型智能擦除:Sanster/IOPaint,python(1)
基于github上的开源项目:https://github.com/Sanster/IOPainthttps://github.com/Sanster/IOPaint
1、安装。直接python的pip安装:
pip3 install iopaint
2、启动。
默认的启动命令是:
iopaint start --model=lama --device=cpu --port=8080
但是这样会把巨大的模型默认下载到C盘下,参数 --model-dir 可以修改默认模型下载路径:
iopaint start --model=lama --device=cpu --port=8080 --model-dir=D:/code/python/Sanster/IOPaint
模型会下载到指导的 D:/code/python/Sanster/IOPaint 目录下。
启动后,如果一切顺利,就可以在浏览器用 127.0.0.1:8080 访问。
3、AIGC智能擦除效果。
原图:
调画笔宽度:
选中一部分区域消除:
最终消除的结果图: