绘画教程 | vol.1 绘画软件Stable Diffusion安装
-1 更新
在最新版的启动器中,开发者秋叶已经将启动器设置python/git路径放到了新的位置,如图所示:

stable diffusion webui 启动器
0 前言
stable diffusion是一种基于深度学习的图像生成技术,它有很多应用,比如人脸生成、风格迁移、动漫画等。如果你想尝试stable diffusion来创作你自己的AI画图,那么你需要先安装它。在这篇文章中,我将向你介绍如何在Win10/Win11上安装stable diffusion,并给出一些使用技巧和注意事项。
这里我提供了一份整合包,里面包含了
- git安装包
- python3.10安装包
- 启动器运行依赖
- stable diffusion WebUI整合包
- 自带dalcefo模型
- 整合Easynegative
整合包下载地址:
链接: https://pan.baidu.com/s/1nNNXH7rxCavcPAZ421D9gw?pwd=aigc
提取码: aigc
如果你是刚接触AI绘画领域的新手,也不用担心,按照我的步骤来,我会教你如何实现像我一样的效果。
0 录屏教程
1 必备环境安装
解压整合包,先打开第一个文件夹


1.1 安装git
git安装很简单,全部按照默认,一步步点“next”即可。


1.2 安装python
这里需要注意!一定要勾上"Add python.exe to PATH", 然后点击Install Now


1.3 安装【启动器运行依赖】
这个没什么好说的,直接点下去就行。


2. Stable Diffusion安装
第一步里的三个软件安装完,我们就进入正式环节了。由于stable diffusion放在github上,大家的网络或多或少会访问不了,因此我这边做了一个整合包,并把国内大佬做的启动器、模型等整合在其中,大家开箱即用。
2.1 解压整合包,放到任意位置


2.2 运行启动器
进入解压好的文件夹,双击打开A启动器.exe


2.3 配置启动器,仔细!
这一步很重要,请大家务必仔细操作。


第一步选择【高级选项】,第二步点击下边红色的【配置按钮】


在这里,我们分别要把第一步骤里安装好的python和git,配置到这里。
更新
在最新版的启动器中,开发者秋叶已经将启动器设置python/git路径放到了新的位置,如图所示:



stable diffusion webui 启动器
python路径
打开C盘 > 用户 > (你的用户名) > AppData > Local > Programs > Python > Python310
选择python.exe,然后确认


python安装路径
git路径
打开C盘 > Program Files > Git > Bin
选择git.exe,然后确认


git位置
找不到你说的这些文件夹怎么办?
不要着急,这些文件夹有可能是隐藏的,windows默认不显示隐藏文件夹,百度一下“win10显示隐藏文件”或者“win11显示隐藏文件”,然后再回来操作就行。
2.4 一键启动
配置完后,关闭窗口,点击右下角的【一键启动】
注:第一次启动,启动器会自动更新和拉取所需文件,如下图所示↓
我这边测试过多台全新电脑,平均时间在10~15分钟左右,请大家一定要保持耐心等待!


2.5 启动成功的标志
当出现这一行字的时候:
Running on local URL: http://0.0.0.0:7860
就说明stable diffusion已经成功在你的电脑上运行起来了,恭喜!


3. 启动成功,第一次绘画测试
随着启动完成,我们在浏览器输入“http://127.0.0.1:7860”,进入操作界面,如下图所示。
我的整合包暂时已经自带了一个绘画模型,可以这么测试:
在prompt里输入
realistic, intricate details, portrait of a girl, purple hair, the fallen, depressed, dark series,Close-up photo,1girl
在negative prompt里输入:
EasyNegative
其他什么都不用改,点击Generate的大按钮,即可生成这样的图片:


到此为止,可以庆祝一下第一篇教程顺利完成了!恭喜你,已经进入充满无穷未知和乐趣的AI绘画领域!
这样的报错了,求解决
Python 3.10.10 (tags/v3.10.10:aad5f6a, Feb 7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]
Commit hash: 0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8
Installing torch and torchvision
Looking in indexes: https://mirrors.bfsu.edu.cn/pypi/web/simple, https://pypi.tuna.tsinghua.edu.cn/simple, https://pypi.doubanio.com/simple, https://download.pytorch.org/whl/cu117
Looking in links: https://mirror.sjtu.edu.cn/pytorch-wheels/torch_stable.html
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', TimeoutError('_ssl.c:980: The handshake operation timed out'))': /pytorch-wheels/torch_stable.html
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', TimeoutError('_ssl.c:980: The handshake operation timed out'))': /whl/cu117/torch/
Collecting torch==1.13.1+cu117
Downloading https://download.pytorch.org/whl/cu117/torch-1.13.1%2Bcu117-cp310-cp310-win_amd64.whl (2255.4 MB)
求问这个怎么解决的?等待吗
可以了,补充一下,原来第一次打开需要等大概10-15分钟就好了
可以不装C盘嘛
你好,我今晚下载后,版本更新了变为绘世2.0.5 然后高级选项哪里,左下角的红色框框不见了!请问应该去哪里改路径?
最下面的设置,配置模式改成专家,环境设置
第一次进入了,后面重启一直卡在DiffusionWrapper has 859.52 M params有什么办法解决么
可以看看下面这个链接:
https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/7901" rel="noopener" target="_blank">github
全都是错误,下载不来
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /pytorch-wheels/torch_stable.html
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /pypi/web/simple/numpy/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/numpy/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/numpy/
Collecting numpy
Downloading https://download.pytorch.org/whl/numpy-1.24.1-cp310-cp310-win_amd64.whl (14.8 MB)
---------------------------------------- 14.8/14.8 MB 8.2 MB/s eta 0:00:00
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /pytorch-wheels/torch_stable.html
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /pypi/web/simple/requests/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/requests/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/requests/
Collecting requests
Downloading https://download.pytorch.org/whl/requests-2.28.1-py3-none-any.whl (62 kB)
---------------------------------------- 62.8/62.8 kB 3.3 MB/s eta 0:00:00
是我网络问题,已经启动了
报错了,都是connection broken网络错误,你需要一个更好的网络环境
已退出进程,代码为 1 (0x00000001)]
提示:检测到 SD-WebUI 进程退出状态不正常,建议前往疑难解答页面扫描错误记录或寻求其他帮助。
RuntimeError: Couldn't install gfpgan.怎么解决
网上看日志,有没有connection timeout
求解决,启动器打开失败。进度条走一会自己就消失了,怎么解决
下载文件.launcher StableDiffusionWebUILauncher.dll 时发生错误:无法成功完成操作,因为文件包含病毒或潜在的垃圾软件。'C:UsersUH\AppData Local Templauncher-a84cbe8a01fc93bc\596592db19128e29cdaa1142096c11488209794f3c9daad80b0cb88f3e1e2f810a29b123b6560fb663de5501e91c1e8f9cda389838d3bae93def5cd22992c23请稍后再次尝试更新
启动器无法打开一直提示这个
4090全天满负荷运转
I don't think the title of your enticle matches the content lol. Just kidding, mainly because I had some doubts after reading the enticle. https://www.binance.com/en/register?ref=P9L9FQKY
The point of view of your article has taught me a lot, and I already know how to improve the paper on gate.oi, thank you. https://www.gate.io/de/signup/XwNAU
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me. https://www.binance.com/ro/register?ref=P9L9FQKY
ImportError: cannot import name '_compare_version' from 'torchmetrics.utilities.imports' (C:\Users\67742\AppData\Local\Programs\Python\Python310\lib\site-packages\torchmetrics\utilities\imports.py)
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。
Your article gave me a lot of inspiration, I hope you can explain your point of view in more detail, because I have some doubts, thank you.
有人和我一样的吗?怎么解决啊
Traceback (most recent call last):
File "C:\Users\hp\Desktop\AIGC WTF教学\2 解压\stable-diffusion-webui\launch.py", line 361, in
start()
File "C:\Users\hp\Desktop\AIGC WTF教学\2 解压\stable-diffusion-webui\launch.py", line 352, in start
import webui
File "C:\Users\hp\Desktop\AIGC WTF教学\2 解压\stable-diffusion-webui\webui.py", line 15, in
from modules import import_hook, errors, extra_networks, ui_extra_networks_checkpoints
File "C:\Users\hp\Desktop\AIGC WTF教学\2 解压\stable-diffusion-webui\modules\ui_extra_networks_checkpoints.py", line 6, in
from modules import shared, ui_extra_networks, sd_models
File "C:\Users\hp\Desktop\AIGC WTF教学\2 解压\stable-diffusion-webui\.launcher\pyinterop.hfkx1kkk0g4q7.zip\swlutils\hook.py", line 188, in exec_module
File "C:\Users\hp\Desktop\AIGC WTF教学\2 解压\stable-diffusion-webui\modules\sd_models.py", line 17, in
from modules.sd_hijack_inpainting import do_inpainting_hijack
File "C:\Users\hp\Desktop\AIGC WTF教学\2 解压\stable-diffusion-webui\modules\sd_hijack_inpainting.py", line 7, in
import ldm.models.diffusion.ddpm
File "C:\Users\hp\Desktop\AIGC WTF教学\2 解压\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\models\diffusion\ddpm.py", line 12, in
import pytorch_lightning as pl
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\pytorch_lightning\__init__.py", line 34, in
from pytorch_lightning.callbacks import Callback # noqa: E402
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\pytorch_lightning\callbacks\__init__.py", line 25, in
from pytorch_lightning.callbacks.progress import ProgressBarBase, RichProgressBar, TQDMProgressBar
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\pytorch_lightning\callbacks\progress\__init__.py", line 22, in
from pytorch_lightning.callbacks.progress.rich_progress import RichProgressBar # noqa: F401
File "C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\pytorch_lightning\callbacks\progress\rich_progress.py", line 20, in
from torchmetrics.utilities.imports import _compare_version
ImportError: cannot import name '_compare_version' from 'torchmetrics.utilities.imports' (C:\Users\hp\AppData\Local\Programs\Python\Python310\lib\site-packages\torchmetrics\utilities\imports.py)
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。
Your point of view caught my eye and was very interesting. Thanks. I have a question for you. https://www.binance.info/en/join?ref=RQUR4BEO
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.
Thank you very much for sharing, I learned a lot from your article. Very cool. Thanks.
Thank you very much for sharing, I learned a lot from your article. Very cool. Thanks.
Looking for expert guidance on protecting assets while qualifying for Medicaid? As experienced elder law attorneys near me, our team at Ohio Medicaid Lawyers provides specialized legal assistance with Medicaid planning, estate planning, and asset protection strategies. We help seniors understand medicaid eligibility income charts and navigate the complex 5-year lookback period. Visit our website for comprehensive information about Ohio medicaid income limits 2024 and schedule a consultation with a trusted elder care attorney who can safeguard your future.