NovelAI

GitHub - AUTOMATIC1111/stable-diffusion-webui: Stable Diffusion web UI

Required Dependencies

GitHub - AUTOMATIC1111/stable-diffusion-webui: Stable Diffusion web UI

Python 3.10.6 and Git

miniconda 换源(添加镜像)_哈!小白要成长!的博客-CSDN博客_miniconda换源

Previous PyTorch Versions | PyTorch

Anaconda的虚拟环境的包在哪里?(详细教程)_仭的博客-CSDN博客_anaconda创建的虚拟环境存储在哪

Index of /anaconda/cloud/pytorch/win-64/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror

Git (git-scm.com)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 新建虚拟环境,python版本是3.10.6
conda create -n novelai python==3.10.6

# 激活虚拟环境
conda activate novelai

# 查看CUDA信息
nvcc -V
nvidia-smi

# 查看conda信息,改一下conda源,下载是时候不至于掉线。
conda info

# 下载对于cuda版本的PyTorch,不要下载CPU版本的,而是GPU版本的
conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/win-64/

PyTorch VERIFICATION

Start Locally | PyTorch

To ensure that PyTorch was installed correctly, we can verify the installation by running sample PyTorch code. Here we will construct a randomly initialized tensor.

From the command line, type:

1
python

then enter the following code:

1
2
3
import torch
x = torch.rand(5, 3)
print(x)

The output should be something similar to:

1
2
3
4
5
tensor([[0.3380, 0.3845, 0.3217],
[0.8337, 0.9050, 0.2650],
[0.2979, 0.7141, 0.9069],
[0.1449, 0.1132, 0.1375],
[0.4675, 0.3947, 0.1426]])

Additionally, to check if your GPU driver and CUDA is enabled and accessible by PyTorch, run the following commands to return whether or not the CUDA driver is enabled:

1
2
import torch
torch.cuda.is_available()

Code from this repository

1
2
# Clone 仓库到本地
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
1
2
# 在仓库根目录下,安装依赖库
python -m pip install -r .\requirements.txt

The Stable Diffusion model checkpoint

The Stable Diffusion model checkpoint, a file with .ckpt extension, needs to be downloaded and placed in the models/Stable-diffusion directory.

AI作画保姆级教程来了!逆天,太强了!_哔哩哔哩_bilibili

权重文件下载地址(提取码: o89H ):链接

显卡显存不足,生成图是全黑的,使用下面的命令来解决。

1
python .\launch.py --lowvram --precision full --no-half

NovelAI
https://cosmicdusty.cc/post/AI/StableDiffusionNovelAI/
作者
Murphy
发布于
2022年11月1日
许可协议