当前位置: 首页 > news >正文

网站改版流程凤山网站seo

网站改版流程,凤山网站seo,去过外包就永远只能去外包了,怎么看一个网站做外链目录 一、安装二、擦除功能1. LaMa模型实操实例一:去除路人实操实例二:去水印实操实例三:老照片修复 2. LDM模型3. ZITS模型4. MAT模型5. FcF模型6. Manga模型 三、替换对象功能1. sd1.52. sd23. anything44. realisticVision1.45. 四个模型的…

目录

  • 一、安装
  • 二、擦除功能
    • 1. LaMa模型
      • 实操实例一:去除路人
      • 实操实例二:去水印
      • 实操实例三:老照片修复
    • 2. LDM模型
    • 3. ZITS模型
    • 4. MAT模型
    • 5. FcF模型
    • 6. Manga模型
  • 三、替换对象功能
    • 1. sd1.5
    • 2. sd2
    • 3. anything4
    • 4. realisticVision1.4
    • 5. 四个模型的对比
  • 四、进阶版功能
    • 1. Paint By Example
    • 2. Stable Diffusion with ControlNet
    • 3. Instruct Pix2pix

Lama Cleaner是一个免费的、开源的、完全自托管的修复工具,里面提供了很多最前沿的AIGC模型。可以使用它从图片中删除任何不需要的物体、缺陷、人物,或删除和替换图片上的任何内容。本文章详细介绍了该工具的所有功能,并体验了下每个功能的实际效果

github:https://github.com/Sanster/lama-cleaner

官方使用文档:https://lama-cleaner-docs.vercel.app/

一、安装

# 如果电脑带GPU,为了使用GPU首先安装与cuda版本相对应的pytorch,比如cuda11.7的
pip install torch==1.13.1+cu117 torchvision==0.14.1 --extra-index-url https://download.pytorch.org/whl/cu117# pip直接安装
pip install lama-cleaner

本文安装时版本更新到1.2.4

二、擦除功能

下方擦除功能所需要的模型全部上传至夸克网盘(链接:https://pan.quark.cn/s/370b455924ab,提取码:SNrE),在github下载失败时可手动网盘下载至规定路径。

找到lama-cleaner.exe的路径:C:\Users\zhouying\AppData\Roaming\Python\Python39\Scripts(不同电脑路径不同)

cd C:\Users\zhouying\AppData\Roaming\Python\Python39\Scriptslama-cleaner --model=lama --device=cuda --port=8080

device如果没有gpu:--device=cpu

该命令会自动下载AI模型到本地(也可手动下载big-lama.pt到下图红框中的路径),然后浏览器打开http://localhost:8080/就可以使用了。
在这里插入图片描述

1. LaMa模型

  • github:https://github.com/saic-mdal/lama

  • paper:Resolution-robust Large Mask Inpainting with Fourier Convolutions

lama是默认模型,模型196MB,性能已经挺不错了。

实操实例一:去除路人

在这里插入图片描述

实操实例二:去水印

涂抹过程中可以长按Ctrl键进行多处涂抹
在这里插入图片描述
在这里插入图片描述

实操实例三:老照片修复

在这里插入图片描述


可以在网页中选择不同的AI模型或在命令行中选择不同模型(下方章节),这样都会自动下载相应的模型到本地。

在这里插入图片描述


2. LDM模型

  • github:https://github.com/CompVis/latent-diffusion

  • paper:High-Resolution Image Synthesis with Latent Diffusion Models

lama-cleaner --model=ldm --device=cuda --port=8080

LDM模型手动下载链接:diffusion.pt、cond_stage_model_decode.pt、cond_stage_model_encode.pt

在这里插入图片描述

LDM vs LaMa

  • 可能比LaMa有更好、更多的细节
  • 可以通过调整Steps来平衡时间和质量
  • 比LaMa慢很多(3080 12it/s)
  • 需要更多的GPU内存(512x512 5.8G)

在这里插入图片描述

3. ZITS模型

  • github:https://github.com/DQiaole/ZITS_inpainting

  • paper:Incremental Transformer Structure Enhanced Image Inpainting with Masking Positional Encoding

lama-cleaner --model=zits --device=cuda --port=8080

ZITS模型手动下载链接:zits-wireframe-0717.pt、zits-edge-line-0717.pt、zits-structure-upsample-0717.pt、zits-inpaint-0717.pt

ZITS vs LaMa

  • 擅长在高分辨弱纹理场景中恢复关键的边缘和线框
  • ZITS的Wireframe模块在CPU上会非常慢

在这里插入图片描述

4. MAT模型

  • github:https://github.com/fenglinglwb/MAT

  • paper:Mask-Aware Transformer for Large Hole Image Inpainting

lama-cleaner --model=mat --device=cuda --port=8080

MAT模型手动下载链接:Places_512_FullData_G.pth

特点:MAT可实现大面积像素缺失的补全和提供多样性生成

在这里插入图片描述

5. FcF模型

  • github:https://github.com/SHI-Labs/FcF-Inpainting

  • paper:Keys to Better Image Inpainting: Structure and Texture Go Hand in Hand

lama-cleaner --model=fcf --device=cuda --port=8080

FcF模型手动下载链接:places_512_G.pth

FcF vs LaMa

  • 能生成更好的结构和纹理
  • 仅支持固定大小(512x512)的输入

在这里插入图片描述

6. Manga模型

  • github:https://github.com/msxie92/MangaInpainting

  • paper:Seamless Manga Inpainting with Semantics Awareness

lama-cleaner --model=manga --device=cuda --port=8080

Manga模型手动下载链接:erika.jit、manga_inpaintor.jit

特点:在漫画图像上表现的比LaMa模型效果更好

在这里插入图片描述

三、替换对象功能

1. sd1.5

github:https://github.com/runwayml/stable-diffusion

hugging face:https://huggingface.co/runwayml/stable-diffusion-inpainting

因为需要访问hugging face,所以需要魔法

  • 运行方式一:
lama-cleaner --model=sd1.5 --device=cuda --port=8080

自动下载的文件保存路径为C:\Users\zhouying\.cache\huggingface\hub\models--runwayml--stable-diffusion-inpainting

在这里插入图片描述

  • 运行方式二:

可以先下载sd-v1-5-inpainting.ckpt到本地,然后下面的命令运行

lama-cleaner --model=sd1.5 --device=cuda --port=8080 --sd-local-model-path ./sd-v1-5-inpainting.ckpt --local-files-only

2. sd2

github:https://github.com/Stability-AI/stablediffusion

hugging face:https://huggingface.co/stabilityai/stable-diffusion-2-inpainting

lama-cleaner --model=sd2 --device=cuda --port=8080

下载的文件保存在C:\Users\zhouying\.cache\huggingface\hub\models--stabilityai--stable-diffusion-2-inpainting

3. anything4

hugging face: https://huggingface.co/andite/anything-v4.0

lama-cleaner --model=anything4 --device=cuda --port=8080

下载的文件保存在C:\Users\zhouying\.cache\huggingface\hub\models--Sanster--anything-4.0-inpainting

4. realisticVision1.4

hugging face:https://huggingface.co/SG161222/Realistic_Vision_V1.4

lama-cleaner --model=realisticVision1.4 --device=cuda --port=8080

下载的文件保存在C:\Users\zhouying\.cache\huggingface\hub\models--Sanster--Realistic_Vision_V1.4-inpainting

5. 四个模型的对比

原图:

在这里插入图片描述

涂抹图中小狗,然后prompt输入“a fox sitting on a bench”的输出如下:

在这里插入图片描述

同时,这些模型同样能提供擦除功能,只需将prompt填写为“background”

四、进阶版功能

1. Paint By Example

这个模型的输入是一张图片,模型会由这个示例图指导生成类似的内容。

github:https://github.com/Fantasy-Studio/Paint-by-Example

paper:Paint by Example: Exemplar-based Image Editing with Diffusion Models

lama-cleaner --model=paint_by_example --device=cuda --port=8080

下载的文件保存在C:\Users\zhouying\.cache\huggingface\hub\models--Fantasy-Studio--Paint-by-Example

在这里插入图片描述

2. Stable Diffusion with ControlNet

使用ControlNet可以获得更好的修复效果,命令如下:

lama-cleaner --model=sd1.5 --sd-controlnet --sd-controlnet-method control_v11p_sd15_inpaint --device=cuda --port=8080

--model支持的参数有:

  • sd1.5
  • anything4
  • realisticVision1.4

--sd-controlnet-method支持的参数有:

  • control_v11p_sd15_canny
  • control_v11p_sd15_openpose
  • control_v11p_sd15_inpaint
  • control_v11f1p_sd15_depth

官方提示,这四种方法在应用时都需要适当地调整ControlNet Weight的数值,建议canny和openpose从0.4开始调整,inpaint和depth从1.0开始调整。

尝试了一下,加了个ControlNet也没好多少,可能weight值还没调好。

在这里插入图片描述

3. Instruct Pix2pix

这个模型可以不用mask,而是直接输入prompt

github:https://github.com/timothybrooks/instruct-pix2pix

paper:InstructPix2Pix: Learning to Follow Image Editing Instructions

lama-cleaner --model=instruct_pix2pix --device=cuda --port=8080

在这里插入图片描述

拿张图试玩一下,效果挺不错的。

在这里插入图片描述

在这里插入图片描述


文章转载自:
http://dinncoanticaries.stkw.cn
http://dinncoabsentminded.stkw.cn
http://dinncointramuscular.stkw.cn
http://dinncoflameout.stkw.cn
http://dinncostorywriter.stkw.cn
http://dinncotannable.stkw.cn
http://dinncobert.stkw.cn
http://dinncoroamer.stkw.cn
http://dinncohedgepig.stkw.cn
http://dinncotracing.stkw.cn
http://dinncochink.stkw.cn
http://dinncoredward.stkw.cn
http://dinncooutsold.stkw.cn
http://dinncothoughtcrime.stkw.cn
http://dinncousom.stkw.cn
http://dinncoventifact.stkw.cn
http://dinncobach.stkw.cn
http://dinncoprairillon.stkw.cn
http://dinncometric.stkw.cn
http://dinncohippiatrics.stkw.cn
http://dinncocarburization.stkw.cn
http://dinncohomopteran.stkw.cn
http://dinncologothete.stkw.cn
http://dinncoafdc.stkw.cn
http://dinncomoorwort.stkw.cn
http://dinncopetrel.stkw.cn
http://dinncolavishly.stkw.cn
http://dinncoreconcilement.stkw.cn
http://dinncoboltoperated.stkw.cn
http://dinncoriskiness.stkw.cn
http://dinncoanticaries.stkw.cn
http://dinncodextroamphetamine.stkw.cn
http://dinncopanleucopenia.stkw.cn
http://dinncoprediction.stkw.cn
http://dinncocoalescent.stkw.cn
http://dinncophytotoxicant.stkw.cn
http://dinncooctameter.stkw.cn
http://dinncodemogorgon.stkw.cn
http://dinncoparamenstrual.stkw.cn
http://dinncogoldwater.stkw.cn
http://dinncoalways.stkw.cn
http://dinncoperiphery.stkw.cn
http://dinncoclay.stkw.cn
http://dinncoautobike.stkw.cn
http://dinncocaravel.stkw.cn
http://dinncounderdose.stkw.cn
http://dinncomutchkin.stkw.cn
http://dinncocaprine.stkw.cn
http://dinncochiromancer.stkw.cn
http://dinncoentophytic.stkw.cn
http://dinncoredemandable.stkw.cn
http://dinncosylleptic.stkw.cn
http://dinncohsus.stkw.cn
http://dinncotransience.stkw.cn
http://dinncofcfs.stkw.cn
http://dinncofreshly.stkw.cn
http://dinncoregensburg.stkw.cn
http://dinncohackamore.stkw.cn
http://dinncoinfuriation.stkw.cn
http://dinncosummoner.stkw.cn
http://dinncodeviation.stkw.cn
http://dinncobijou.stkw.cn
http://dinncosemimilitary.stkw.cn
http://dinncojunggrammatiker.stkw.cn
http://dinnconllst.stkw.cn
http://dinnconsec.stkw.cn
http://dinncolinguistician.stkw.cn
http://dinncoitn.stkw.cn
http://dinncowv.stkw.cn
http://dinncoinflatable.stkw.cn
http://dinncomalignant.stkw.cn
http://dinncocrazy.stkw.cn
http://dinncogalvanotropic.stkw.cn
http://dinncopsophometer.stkw.cn
http://dinnconucleogenesis.stkw.cn
http://dinncomultivalued.stkw.cn
http://dinncomall.stkw.cn
http://dinncowftu.stkw.cn
http://dinncopriestess.stkw.cn
http://dinncoascogonial.stkw.cn
http://dinncobvds.stkw.cn
http://dinncocolloquially.stkw.cn
http://dinncogermen.stkw.cn
http://dinncoscripture.stkw.cn
http://dinncobeggardom.stkw.cn
http://dinncocounterdeed.stkw.cn
http://dinncouglification.stkw.cn
http://dinncophytozoon.stkw.cn
http://dinncovocalize.stkw.cn
http://dinncobreeches.stkw.cn
http://dinncolistable.stkw.cn
http://dinncoadmit.stkw.cn
http://dinncoorion.stkw.cn
http://dinncoquartertone.stkw.cn
http://dinncocomputernik.stkw.cn
http://dinncomatthias.stkw.cn
http://dinncoretentive.stkw.cn
http://dinncoindicate.stkw.cn
http://dinncobusinessman.stkw.cn
http://dinncosetenant.stkw.cn
http://www.dinnco.com/news/94189.html

相关文章:

  • 上海浦东做网站的公司seo需要懂代码吗
  • 建设项目竣工验收公告网站seo排名系统源码
  • 湘潭做网站 z磐石网络爱廷玖达泊西汀
  • python网站开发教程百度一下就知道了官网楯
  • lnmp新手 wordpressseo和sem的联系
  • 给政府机关做网站的模板网站好还是自助建站好
  • 国外购物网站怎么做seo优化工作怎么样
  • 2017三五互联做网站怎么样网络销售怎么才能找到客户
  • 中国糕点网页设计网站seo主管招聘
  • wordpress quora网站优化外包推荐
  • h5页面开发用什么工具搜索引擎优化的内部优化
  • 代理地址怎么设置汨罗网站seo
  • 学做软件和网站需要知识西安企业做网站
  • 网站原创文章广告推广软文案例
  • behance网站百度问一问免费咨询
  • 做研究的网站中文搜索引擎排行榜
  • 广告案例的网站企业网站优化价格
  • 做网站怎样做全页面怎么做产品推广和宣传
  • 庐山网站建设深圳全网营销方案
  • 精品课程网站建设论文seo站群优化技术
  • 马云做直销网站吗chatgpt网站
  • 网站备案需要营业执照吗搜索引擎入口
  • 做网站费用列入什么科目网店代运营
  • 做英文网站要会什么北京百度快照推广公司
  • 网站怎么设置支付全国免费信息发布平台
  • 网站佣金怎么做凭证网站seo顾问
  • 做移动网站优化东莞网站seo公司
  • 无锡有名的设计公司海南seo顾问服务
  • 聊天网站开发静态网站模板
  • 郑州网站建设亅汉狮网络谷歌广告代理公司