Skip to content

Instantly share code, notes, and snippets.

@trojblue
Last active May 7, 2023 00:27
Show Gist options
  • Save trojblue/dd128b1accb7ede27f21133656f50962 to your computer and use it in GitHub Desktop.
Save trojblue/dd128b1accb7ede27f21133656f50962 to your computer and use it in GitHub Desktop.

更新环境:

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

减小体积

link

(目录是C:\Windows\System32)

wsl shutdown
diskpart
select vdisk file=D:\APP\0VM\Ubuntu\ext4.vhdx
attach vdisk readonly
compact vdisk
detach vdisk

(多次重复时, 可以按照上面link的建议存成txt执行)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment