风险提示:虚拟货币不具有法定货币等同的法律地位,参与虚拟货币投资交易存在法律风险,继续浏览代表你同意以上所有声明,否则请立即关闭本站!

Lama Cleaner是什么?

Lama Cleaner是一款开源且免费的人工学习图片去水印程序(个人主要学习用途),没有图片分辨率限制(个人使用暂未发现),并且保存的图片质量很高(个人觉得跟原图差不多),还能下载处理后的图片到本地。

项目地址:https://github.com/Sanster/lama-cleaner
原作者:Sanster

截止到目前(2023-03-01)仍然在更新,最新版为0.37.0。

本文为小白精简安装,不需要接入秘钥。
所有用到的工具下载地址在最下方。

搭建环境

安装python3.10.9-amd64.exe

安装Git-2.40.1-64-bit.exe

这两项比较简单,不做过多赘述,如果安装软件不会安装的请自行百度。

安装Ai管理工具

解压文件后,重新命名文件夹seait

并复制到C盘根文件夹

01.png

右键选择seait.exe管理员运行

02.png

点击页面设置,选择中文模式

03.png

检查环境安装情况,python和git显示已安装

04.png

点击lama cleaner

05.png

点击安装【图中安装完成显示启动】

配置参数:

--host=192.168.8.109  #ip地址

--port=8080  #端口号

--device=cpu/cuda    #有显卡的选择 cuda

这是安装成功界面,如果中途遇到安装失败,与网速有关,需要安装加速器。

加速器不做推荐,请自行脑补。

06.png

图中显示的http://192.168.8.109:8080就是登录地址

07.png

输入ip+端口号登录,然后选择设置。
08.png

按照图中进行设置即可。

下载地址:

点击下载

密码:hyf2.cc

所有命令行参数

usage: main.py [-h] [--host HOST] [--port PORT] [--config-installer] [--load-installer-config] [--installer-config INSTALLER_CONFIG] [--model {lama,ldm,zits,mat,fcf,sd1.5,cv2,manga,sd2,paint_by_example,instruct_pix2pix}] [--no-half]
[--cpu-offload] [--disable-nsfw] [--sd-cpu-textencoder] [--local-files-only] [--enable-xformers] [--device {cuda,cpu,mps}] [--gui] [--no-gui-auto-close] [--gui-size GUI_SIZE GUI_SIZE] [--input INPUT]
[--output-dir OUTPUT_DIR] [--model-dir MODEL_DIR] [--disable-model-switch]

optional arguments:
-h, --help            show this help message and exit
--host HOST
--port PORT
--config-installer    Open config web page, mainly for windows installer (default: False)
--load-installer-config
Load all cmd args from installer config file (default: False)
--installer-config INSTALLER_CONFIG
Config file for windows installer (default: None)
--model {lama,ldm,zits,mat,fcf,sd1.5,cv2,manga,sd2,paint_by_example,instruct_pix2pix}
--no-half             Using full precision model. If your generate result is always black or green, use this argument. (sd/paint_by_exmaple) (default: False)
--cpu-offload         Offloads all models to CPU, significantly reducing vRAM usage. (sd/paint_by_example) (default: False)
--disable-nsfw        Disable NSFW checker. (sd/paint_by_example) (default: False)
--sd-cpu-textencoder  Run Stable Diffusion text encoder model on CPU to save GPU memory. (default: False)
--local-files-only    Use local files only, not connect to Hugging Face server. (sd/paint_by_example) (default: False)
--enable-xformers     Enable xFormers optimizations. Requires xformers package has been installed. See: https://github.com/facebookresearch/xformers (sd/paint_by_example) (default: False)
--device {cuda,cpu,mps}
--gui                 Launch Lama Cleaner as desktop app (default: False)
--no-gui-auto-close   Prevent backend auto close after the GUI window closed. (default: False)
--gui-size GUI_SIZE GUI_SIZE
Set window size for GUI (default: [1600, 1000])
--input INPUT         If input is image, it will be loaded by default. If input is directory, you can browse and select image in file manager. (default: None)
--output-dir OUTPUT_DIR
Result images will be saved to output directory automatically without confirmation. (default: None)
--model-dir MODEL_DIR
Model download directory (by setting XDG_CACHE_HOME environment variable), by default model downloaded to ~/.cache (default: /Users/cwq/.cache)
--disable-model-switch
Disable model switch in frontend (default: False)

发表评论