Commit eee42a62 authored by 孙傲's avatar 孙傲

完善`Stable Diffusion web UI`的环境配置

parent 8978347c
记录 `Stable Diffusion` 本地环境搭建过程,以及 `Stable Diffusion` 的使用方法。
以下步骤均为`Windows 64位`环境下的操作,推荐使用`Windows 11`
一、环境安装
1. 下载依赖
点击 [此处](https://git.devops.yitong.com/yitong-public/awesome-stable-diffusion/-/archive/master/awesome-stable-diffusion-master.zip) 下载依赖包,解压到任意目录。
例如解压到`D盘`根目录,对应解码目录为: `D:\awesome-stable-diffusion-master\`,目录结构如下:
```bash
PS D:\awesome-stable-diffusion-master> dir
目录: D:\awesome-stable-diffusion-master
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2023/7/10 14:48 lora-scripts
d----- 2023/7/10 14:48 stable-diffusion-webui
d----- 2023/7/10 14:48 tools
------ 2023/7/10 14:48 179 README.md
```
2. 安装 `git`
双击 `D:\awesome-stable-diffusion-master\tools\Git-2.41.0.2-64-bit.exe` 安装 `git`,安装过程中一路下一步即可。
3. 安装 `Python`
双击 `D:\awesome-stable-diffusion-master\tools\python-3.10.11-amd64.exe` 安装 `Python`,**安装过程中勾选 `Add python.exe to PATH`**,一路下一步即可。
**注意:** 安装界面的第一步最下面就有`Add python.exe to PATH`选项,勾选后直接选第一个 `Install Now` 即可。
4. 安装 `Stable Diffusion web UI`
双击 `D:\awesome-stable-diffusion-master\stable-diffusion-webui\webui-user.bat` 程序自动安装依赖,安装过程中过下载较大文件,耐心等待。
\ No newline at end of file
......@@ -20,8 +20,6 @@ __pycache__
/styles.csv
/params.txt
/styles.csv.bak
/webui-user.bat
/webui-user.sh
/interrogate
/user.css
/.idea
......
@echo off
set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS= --xformers
pip config set global.index-url https://mirror.baidu.com/pypi/simple
call webui.bat
#!/bin/bash
#########################################################
# Uncomment and change the variables below to your need:#
#########################################################
# Install directory without trailing slash
#install_dir="/home/$(whoami)"
# Name of the subdirectory
#clone_dir="stable-diffusion-webui"
# Commandline arguments for webui.py, for example: export COMMANDLINE_ARGS="--medvram --opt-split-attention"
#export COMMANDLINE_ARGS=""
# python3 executable
#python_cmd="python3"
# git executable
#export GIT="git"
# python3 venv without trailing slash (defaults to ${install_dir}/${clone_dir}/venv)
#venv_dir="venv"
# script to launch to start the app
#export LAUNCH_SCRIPT="launch.py"
# install command for torch
#export TORCH_COMMAND="pip install torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113"
# Requirements file to use for stable-diffusion-webui
#export REQS_FILE="requirements_versions.txt"
# Fixed git repos
#export K_DIFFUSION_PACKAGE=""
#export GFPGAN_PACKAGE=""
# Fixed git commits
#export STABLE_DIFFUSION_COMMIT_HASH=""
#export CODEFORMER_COMMIT_HASH=""
#export BLIP_COMMIT_HASH=""
# Uncomment to enable accelerated launch
#export ACCELERATE="True"
# Uncomment to disable TCMalloc
#export NO_TCMALLOC="True"
###########################################
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment