【AI绘画】Stable diffusion webui的安装和初步使用

文章作者: GoodBoyboy
文章链接: https://blog.goodboyboy.top/posts/1412985548.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 GoodBoyboy 's Blog|惬意小屋-点滴记忆!

前言
最近结课了,使用真的闲得无聊,看到AI绘画满天飞,虽然不怎么感兴趣,但是还是想部署一下玩玩

而且想到自己电脑配置不说比肩大神,但是至少512x512的轻度玩耍还是可以的

AI绘画要求最高的就是GPU了,特别是显存,显存小是真的难受,我电脑GPU是移动端的3060,6g显存感觉还凑合

注:用N卡!!!

安装
这里我用的是AUTOMATIC1111仓库下的Stable diffusion,感觉用起来挺方便的

项目地址:https://github.com/AUTOMATIC1111/stable-diffusion-webui

git clone到本地即可,然后运行webui-user.bat(当然如果是其他系统就运行相应的脚本就行)

运行后会下载各种依赖和其他文件

最大的依赖是pytorch,有2g多,这个下载完了后面的就都是洒洒水了

注:安装时出现的各种问题绝大部分是裸连Github导致无法正常clone造成的,请换一个好的网络环境,必要时请上魔法

接着下载下载权重文件sd-v1-4.ckpt

https://huggingface.co/CompVis/stable-diffusion-v-1-4-original

扔到models/Stable-diffusion目录下

其实我也不确定是否真的要下载,有空去测试一下(本人也在摸索阶段)

安装完可以在控制台找到一个链接,点击进入即可打开Stable diffusion webui

切换简体中文
点击 Extension 选项卡,点击 Install from URL 子选项卡

将git 仓库网址

https://github.com/dtlnor/stable-diffusion-webui-localization-zh_CN

粘贴进 URL 栏,点击 Install进行安装

我这里点击后它提示我已经安装过,但是我之前是没装过,不过无所谓这时候已经装好了

重启Web ui

接着在 Settings 选项卡中,找到 User interface 子选项

然后去页面最底部,找到 Localization ,找到在下拉选单中选中 zh_CN

没有的话就点击旁边的刷新按钮

点击 Apply settings 保存设置

最后点击 Reload UI 重启webUI

优化
Stable diffusion webui默认加载好像会把部分东西加载进VRAM?反正启动完成还没开始绘图就占了我3G的VRAM,

对于我这种只有6G 显存的显卡太不友好了,然后我就发现可以在启动bat里的 set COMMANDLINE_ARGS= 后面添加 –lowvram 参数

这样启动的时候就显存占用就特别小了,给绘画留出了很多空余显存

还有一个插件,用来分块绘画的,就是专门为画高分辨率的画而设计的,下面是他的使用教程

【AI科普】Stable Diffusion显存不够用的拯救者插件

项目地址:https://github.com/pkuliyi2015/multidiffusion-upscaler-for-automatic1111

当然你也可以看官方的介绍(有中文)

https://github.com/pkuliyi2015/multidiffusion-upscaler-for-automatic1111/blob/main/README_CN.md

使用教程
这里我收集了一些使用的初级教程,大家可以参考,不过有点杂

安装使用篇
自力更生:Stable Diffusionwebui本地部署遇到的坑及解决

stable diffusion(安装以及模型的初步使用)

喂饭级stable diffusion webUI使用教程

模型篇
Stable Diffusion模型资源探索食用指南

Stable Diffusion常用模型下载与说明(保姆级)

【AI绘画模型大全】超全的模型资源汇总!

模型推荐:Anything 4.0 最新发布! 还送v4.5?

提示词篇
喂饭级stable diffusion webUI调参权威指南 (内含常用提示词)

AI 绘画咒语入门-Stable Diffusion Prompt 语法指南 【成为初级魔导士吧!】

【Stable Diffusion】Prompt 篇

咒语生成器

进阶篇
喂饭级stable_diffusion_webUI图生图宝典

胎教级stable_diffusion模型训练(真人、lora、动漫、萌宠……)

小试牛刀


4K, best quality, masterpiece, Highly detailed, ultra-fine painting, Sci-fi, cowboy shot,(1boy:1.1), blush, school uniform, looking away
Negative prompt: mutated hands and fingers, deformed, bad anatomy, poorly drawn face, poorly drawn hands, missing limb, disconnected limbs. malformed hands
Steps: 24, Sampler: Euler a, CFG scale: 7, Seed: 66035402, Size: 512x512, Model hash: 1d1e459f9f, Model: anything-v4.5

4K, best quality, masterpiece, Highly detailed, ultra-fine painting, Sci-fi, cowboy shot,1boy, blush, school uniform, looking away
Negative prompt: mutated hands and fingers, deformed, bad anatomy, poorly drawn face, poorly drawn hands, missing limb, disconnected limbs. malformed hands
Steps: 24, Sampler: Euler a, CFG scale: 7, Seed: 66035402, Size: 512x512, Model hash: 1d1e459f9f, Model: anything-v4.5

(和上面的其实是一样的,只是1boy没加权重,就变成女孩了。。。不知道是不是这个模型训练女孩训练的多一些咳咳咳。。。

cyberpunk, slave, avengers, lipstick, zzz, silver hair, semi-rimless eyewear, summer dress, sneakers, Fairy wings, head tilt, back-to-back, rice paddy, Polaroid art, ((full body)),(helpless),tear, crying,(((((falling from the sky))))),((Weathering With You)),((falling)),((face towards the sky)),(hair flows upwards),((disheveled hair)),(1 girl), floating, beautiful detailed sky
Negative prompt: mutated hands and fingers, deformed, bad anatomy, poorly drawn face, poorly drawn hands, missing limb, disconnected limbs. malformed hands
Steps: 24, Sampler: Euler a, CFG scale: 7, Seed: 503677589, Size: 512x512, Model hash: 1d1e459f9f, Model: anything-v4.5

nvinkpunk , POV, muscle man, poet, lipstick, blush stickers, high ponytail, ear covers, gym_uniform, bandaged leg, dinosaur tail, own hands clasped, walk a dog, bar, (((ink))), ((watercolor)), (extremely detailed CG unity 8k wallpaper),(((masterpiece))), (((best quality))), ((ultra-detailed)), (best illustration),(best shadow), ((an extremely delicate and beautiful)),dynamic angle,floating, fairyland,dynamic angle,sea of flowers,beautiful detailed garden,wind,classic,spring, (detailed light),feather, nature, (sunlight), river, forest,(((floating palace))),((the best building)),beautiful and delicate water,(painting),(sketch),(bloom),(shine)
Negative prompt: mutated hands and fingers, deformed, bad anatomy, poorly drawn face, poorly drawn hands, missing limb, disconnected limbs. malformed hands
Steps: 24, Sampler: Euler a, CFG scale: 7, Seed: 3683048110, Size: 512x512, Model hash: 2182245415, Model: Inkpunk-Diffusion-v2

(best quality),(highly detailed),(((boy))),(((student))),
Steps: 24, Sampler: Euler a, CFG scale: 9, Seed: 1119134113, Size: 512x512, Model hash: 9aba26abdf, Model: Deliberate_v2

下面这几个忘记保存参数了,所以就只能将就着看喽

有成功的肯定也有翻车的,下面展示一下翻车案例🤣

文章作者: GoodBoyboy
文章链接: https://blog.goodboyboy.top/posts/1412985548.html
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 GoodBoyboy 's Blog|惬意小屋-点滴记忆!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值