Stable-Diffusion——Windows部署教程

Windows

参考文章:从零开始,手把手教你本地部署Stable Diffusion Webui AI绘画(非最新版)

一键脚本安装

  • 默认环境安装在项目路径的venv
bash 复制代码
conda create -n df_env python==3.10
  • 安装pytorch:(正常用国内网就行)
bash 复制代码
python -m pip install --upgrade pip
# 阿里云源稳定
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
# pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
  • 运行核心脚本
bash 复制代码
webui-user.bat
  • 安装依赖:
bash 复制代码
pip install -r .\requirements.txt
pip install -r .\requirements_versions.txt

pip install accelerate==0.21.0
  • 踩坑特定环境版本:
bash 复制代码
pip install tb_nightly -i https://mirrors.aliyun.com/pypi/simple 

运行

bash 复制代码
python3 launch.py --disable-nan-check
accelerate launch --num_cpu_threads_per_process=6 launch.py --disable-nan-check

效果

下载模型

模型网站:

  • 配置网络:
bash 复制代码
git config --global http.proxy "http://127.0.0.1:7890"
git config --global https.proxy "http://127.0.0.1:7890"
  • 在webui路径下创建openai文件夹:
bash 复制代码
cd openai
git clone https://huggingface.co/openai/clip-vit-large-patch14
相关推荐
John_ToDebug5 小时前
深度解析 Chromium 浏览器 UI 刷新机制与 ThemeService 的核心作用
chrome·windows·ui
繁华似锦respect10 小时前
C++ & Linux 中 GDB 调试与内存泄漏检测详解
linux·c语言·开发语言·c++·windows·算法
油炸自行车12 小时前
【Qt】Qt Creator Debug模式提示“缺少 Windows CDB 调试器配套的扩展组件“”
开发语言·windows·qt
vortex512 小时前
从 Scoop 故障看 Windows 与 Linux 软硬链接与权限机制的底层差异
linux·运维·windows
癫狂的兔子13 小时前
【Office】【Excel】数据透视图
windows
天庭鸡腿哥14 小时前
macOS的功能,在Windows上也能实现
windows·microsoft·macos·visual studio·everything
Micknee14 小时前
Windows环境下配置git和github
windows·git·github
无限进步_14 小时前
C语言宏的魔法:探索offsetof与位交换的奇妙世界
c语言·开发语言·windows·后端·算法·visual studio
CHANG_THE_WORLD14 小时前
Python列表(List)介绍
windows·python·list
cicada1515 小时前
如何在Windows系统下使用Linux环境?
linux·运维·windows