Tuesday, December 6, 2022

Stable diffusion Memo

check installed cuda version:

nvidia-smi or nvcc --version Version 11.3, 11.6, 11.7, 11.8 should be ok.

cuda can be download here

download last cuda 11.X cuda 11.8.0

Download cudnn

OpenAI wisper

to use wisper cuda version shoud cuda version shoud be [V11.7+](https://developer.nvidia.com/cuda-11-8-0-download-archiveT

rerinstall PyTorch With CUDA

import torch
torch.cuda.is_available()
torch.zeros(1).cuda()

error :

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\uriel\AppData\Roaming\Python\Python310\site-packages\torch\cuda\__init__.py", line 221, in _lazy_init
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled

Check setup url on pytorch.org ex: pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117

conda install -c conda-forge cudatoolkit

switch to WSL 2

using doc

wget https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh

Ensure /usr/lib/wsl/lib is in LD_LIBRARY_PATH

export LD_LIBRARY_PATH=/usr/lib/wsl/lib:$LD_LIBRARY_PATH

run stable-diffusion-webui

clone stable diffusion web-UI from here

c01059060130b8242849d86e97212c84 *model.ckpt
acec06c7696a136a3a24abd6e3eb45ac *512-base-ema.ckpt
48cb3980ec03a370b68bd0a9d8eefece *768-v-ema.ckpt
6110602b524327ad6f0b68d883e4e2cd *768-v-ema.yaml
4ea0ae9ae3ba0cf19f1dbcb8dc331af1 *x4-upscaler-ema.ckpt

export COMMANDLINE_ARGS=--xformers --api

swagger availible at: http://127.0.0.1:7860/docs

Official Stable diffusion sources:

stable-diffusion-2-1 768 px model

Note

Hardware: 32 x 8 x A100 GPUs