更新环境:
apt-get -y update && apt-get -y upgrade && apt-get -y install iftop libgl1
miniconda:
cd ~/
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -P miniconda.sh
bash miniconda.sh
cuda: link
# find cuda
ldconfig -p | grep cuda
# ~/.bashrc
export LD_LIBRARY_PATH=/usr/lib/wsl/lib:$LD_LIBRARY_PATH
# refresh env variable
source ~/.bashrc
配置webui:
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui webui
cd ./webui/extensions
# extensions
git clone https://github.com/AlUlkesh/stable-diffusion-webui-images-browser
# animevae
cd ../models/VAE
wget https://huggingface.co/andite/anything-v4.0/resolve/main/anything-v4.0.vae.pt -O animevae.pt
# 下载模型: cd ../Stable-diffusion | cd ../../
# 不下载模型: cd ../../
# launch
python launch.py --xformers --api
(目录是C:\Windows\System32)
wsl shutdown
diskpart
select vdisk file=D:\APP\0VM\Ubuntu\ext4.vhdx
attach vdisk readonly
compact vdisk
detach vdisk
(多次重复时, 可以按照上面link的建议存成txt执行)