Stable Diffusion WebUI Model 加载个人笔记

参考1:https://www.bilibili.com/read/cv20039815

参考2:https://blog.cmyr.ltd/archives/e740aac.html

服务器:阿里云AI机器学习V100计算卡

OS:windows 10/server 均可

其他:

Python 3.10.6

Git

CUDA

步骤:

1.下载 https://docs.conda.io/en/latest/miniconda.html

安装完毕后在开始桌面内选择 Miniconda 即可使用

conda config --set show_channel_urls yes

2.在 C:\Users\XXX\.condarc 下修改文件内容如下

channels:
  - defaults
show_channel_urls: true
default_channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
conda clean -i
//ps管理员打开执行
conda init cmd.exe

打开Miniconda cmd执行

conda create --name stable-diffusion-webui python=3.10.6
conda activate stable-diffusion-webui
python -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade pip

安装cuda11,地址:https://developer.download.nvidia.cn/compute/cuda/11.1.1/local_installers/cuda_11.1.1_456.81_win10.exe

git config --global http.proxy 127.0.0.1:1080 //设置科学工具proxy否则后面无法启动项目
git config --global https.proxy 127.0.0.1:1080
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git 
cd stable
-diffusion-webui

模型下载地址:https://huggingface.co/hakurei/waifu-diffusion-v1-3/tree/main

下载完成后的模型请放到 models\Stable-diffusion\ 下,并将文件名称修改为 model.ckpt

打开Miniconda cmd cd到git根目录执行

conda activate stable-diffusion-webui
webui-user.bat

Negative prompt参考:nsfw,blush,lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts,signature, watermark, username, blurry, artist name,bad feet,big head,fused body,multiple hands,multiple legs,multiple hands,multiple breast,multiple lower legs,multiple thighs,fused body,twist body 

posted @ 2023-01-31 15:31  a1010  阅读(1429)  评论(0编辑  收藏  举报