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
相关推荐
_Aaron___6 小时前
List.subList() 返回值为什么不能强转成 ArrayList
数据结构·windows·list
magic334165637 小时前
Springboot整合MinIO文件服务(windows版本)
windows·spring boot·后端·minio·文件对象存储
babytiger13 小时前
windows中用wsl使用cuda
windows·wsl·cuda
Mr.456713 小时前
Windows 11 右键菜单恢复 Windows 10 经典样式:3 种实用方法详解
windows
一勺-_-14 小时前
安装Windows双系统的步骤
windows
sukalot16 小时前
windows显示驱动开发-多监视器管理器(三)
windows·驱动开发
Java技术实践18 小时前
JPA 用 List 入参在 @Query中报错 unexpected AST node: {vector}
数据结构·windows·list
wangqiaowq18 小时前
ImmutableList.of() 是 Google Guava 库 提供的一个静态工厂方法,用于创建一个不可变的(immutable)列表。
开发语言·windows·python
小龙报19 小时前
《算法每日一题(1)--- 连续因子》
c语言·开发语言·c++·windows·git·算法·visual studio
日日行不惧千万里19 小时前
绕过微软联网账号限制:用本地用户安装 Windows 11 的最新 3 种方法
windows·microsoft