保姆级Windows本地部署Stable Diffusion教程

3,537次阅读
没有评论

当前演示程序为stable-diffusion-webui auto版本Github链接

优点:当前使用人数最多的版本,更新及时

安装建议开启魔法,否则会有大量报错

Stable Diffusion WebUI支持Windows 10和Windows 11。以下演示为Windows 10 64位

一、安装显卡驱动程序

请确认电脑已经安装最新版的显卡驱动程序。
Nvidia显卡用Geforce Experience安装最新驱动,会顺便安装CUDA。或者你想手动下载CUDA也行
AMD显卡请用驱动程序自动侦测工具安装显卡驱动
Intel Arc显卡请安装WHQL驱动

二、python的下载与安装

1.进入https://www.python.org/downloads/页面,下拉至对应页面,点击3.10.6版本(务必选择3.10.6版本,否则Stable Diffusion运行过程中,可能会出现大量报错)进入下载页面

2.下拉页面,根据电脑的操作系统去选择对应的下载链接(图片中选择的是Windows 64位)

3.安装前务必勾选Add Python 3.10 to PATH,将Python加到环境变量

三、Git的下载与安装

进入https://git-scm.com/download/win页面,点击下载Windows 64位的版本,下载后默认安装即可

四、安装stable-diffusion-webui库

到你想安装的路径下点击鼠标右键(这样就可以安装到指定的目录,安装路径需要不含中文)
右键选择 Git Bash Here,复制下面的代码

 git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git

在窗口中按”Shift”+”INS”键进行粘贴,点击回车,出现报错时,请关闭窗口,重新运行上图的命令

五、设置启动命令行参数

如下图所示,对stable-diffusion-webui文件夹里面的webui-user.bat按右键,
以记事本打开 (看不到.bat请点击文件夹查看 → 显示/隐藏 → 文件扩展名)

接着您要编辑set COMMANDLINE_ARGS=这一行启动参数。

显存VRAM在8GB以上,将set COMMANDLINE_ARGS= 替换成

set COMMANDLINE_ARGS=--enable-insecure-extension-access

显存VRAM小于等于4GB,将set COMMANDLINE_ARGS=替换成

set COMMANDLINE_ARGS=--medvram --opt-split-attention --enable-insecure-extension-access

medvram的用意是为了限制VRAM占用
电脑内存小于等于8GB的话改替换为

set COMMANDLINE_ARGS=--lowvram --opt-split-attention --enable-insecure-extension-access

注意使用–lowvram参数会让高端显卡算图变很慢。
(下面的不加也可以)
加上--xformers 减少VRAM占用,只支持Nvidia显卡
加入--no-half-vae减少使用VAE算出黑图的几率。
加上--listen 参数再开放防火墙7860通信端口,即可用局域网路其他电脑的浏览器访问WebUI。
加上--share 参数则会产生一组Gradio网址,让你可以从外部网络或手机使用WebUI。网址72小时后过期。需要注意使用安全

六、运行webui-user.bat

进入安装四中的安装路径,找到webui-user.bat文件,双击运行
复制下图中的地址,即http://127.0.0.1:7860,在浏览器中打开

感兴趣的可以来知识库一起学习

正文完
可以使用微信扫码关注公众号(ID:xzluomor)
post-qrcode
 0
评论(没有评论)

文心AIGC

2024 年 3 月
 123
45678910
11121314151617
18192021222324
25262728293031
文心AIGC
文心AIGC
人工智能ChatGPT,AIGC指利用人工智能技术来生成内容,其中包括文字、语音、代码、图像、视频、机器人动作等等。被认为是继PGC、UGC之后的新型内容创作方式。AIGC作为元宇宙的新方向,近几年迭代速度呈现指数级爆发,谷歌、Meta、百度等平台型巨头持续布局
文章搜索
热门文章
清库存!DeepSeek突然补全R1技术报告,训练路径首次详细公开

清库存!DeepSeek突然补全R1技术报告,训练路径首次详细公开

清库存!DeepSeek突然补全R1技术报告,训练路径首次详细公开 Jay 2026-01-08 20:18:...
2025最大AI赢家的凡尔赛年度总结,哈萨比斯Jeff Dean联手执笔

2025最大AI赢家的凡尔赛年度总结,哈萨比斯Jeff Dean联手执笔

2025最大AI赢家的凡尔赛年度总结,哈萨比斯Jeff Dean联手执笔 鹭羽 2025-12-24 09:1...
AI Coding新王登场!MiniMax M2.1拿下多语言编程SOTA

AI Coding新王登场!MiniMax M2.1拿下多语言编程SOTA

AI C++oding新王登场!MiniMax M2.1拿下多语言编程SOTA 克雷西 2025-12-24 ...
智能体落地元年,Agent Infra是关键一环|对话腾讯云&Dify

智能体落地元年,Agent Infra是关键一环|对话腾讯云&Dify

智能体落地元年,Agent Infra是关键一环|对话腾讯云&Dify 鹭羽 2025-12-23 1...
最新评论
ufabet ufabet มีเกมให้เลือกเล่นมากมาย: เกมเดิมพันหลากหลาย ครบทุกค่ายดัง
tornado crypto mixer tornado crypto mixer Discover the power of privacy with TornadoCash! Learn how this decentralized mixer ensures your transactions remain confidential.
ดูบอลสด ดูบอลสด Very well presented. Every quote was awesome and thanks for sharing the content. Keep sharing and keep motivating others.
ดูบอลสด ดูบอลสด Pretty! This has been a really wonderful post. Many thanks for providing these details.
ดูบอลสด ดูบอลสด Pretty! This has been a really wonderful post. Many thanks for providing these details.
ดูบอลสด ดูบอลสด Hi there to all, for the reason that I am genuinely keen of reading this website’s post to be updated on a regular basis. It carries pleasant stuff.
Obrazy Sztuka Nowoczesna Obrazy Sztuka Nowoczesna Thank you for this wonderful contribution to the topic. Your ability to explain complex ideas simply is admirable.
ufabet ufabet Hi there to all, for the reason that I am genuinely keen of reading this website’s post to be updated on a regular basis. It carries pleasant stuff.
ufabet ufabet You’re so awesome! I don’t believe I have read a single thing like that before. So great to find someone with some original thoughts on this topic. Really.. thank you for starting this up. This website is something that is needed on the internet, someone with a little originality!
ufabet ufabet Very well presented. Every quote was awesome and thanks for sharing the content. Keep sharing and keep motivating others.
热评文章
易烊千玺的华为绿手机,真的AI了

易烊千玺的华为绿手机,真的AI了

Failed to fetch content Read More 
AI狼人杀大决战!GPT、Qwen、DeepSeek大乱斗,人类高玩汗流浃背

AI狼人杀大决战!GPT、Qwen、DeepSeek大乱斗,人类高玩汗流浃背

AI狼人杀大决战!GPT、Qwen、DeepSeek大乱斗,人类高玩汗流浃背 鹭羽 2025-12-23 14...
长城首个VLA车型发布,魏建军回应「赌上姓氏造车」

长城首个VLA车型发布,魏建军回应「赌上姓氏造车」

长城首个VLA车型发布,魏建军回应「赌上姓氏造车」 贾浩楠 2025-12-23 13:57:25 来源:量子...