Skip to content

Commit 0b0d8a3

Browse files
camenduruMultimodal AI art
authored and
system
committed
Check GPU to attribute the right xformers (AUTOMATIC1111#7)
- Check GPU to attribute the right xformers (0b07795d5c1011c05517f8a8bfa7fc11d9f90ca0) Co-authored-by: Multimodal AI art <multimodalart@users.noreply.huggingface.co>
1 parent 4c3cb76 commit 0b0d8a3

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

app.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
import os
2-
os.system(f"pip install -q https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.15/xformers-0.0.15.dev0+1515f77.d20221130-cp38-cp38-linux_x86_64.whl")
2+
from subprocess import getoutput
3+
gpu_info = getoutput('nvidia-smi')
4+
if("A10G" in gpu_info):
5+
print("Using A10G")
6+
os.system(f"pip install -q https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.15/xformers-0.0.15.dev0+4c06c79.d20221205-cp38-cp38-linux_x86_64.whl")
7+
elif("T4" in gpu_info):
8+
print("Using T4")
9+
os.system(f"pip install -q https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.15/xformers-0.0.15.dev0+1515f77.d20221130-cp38-cp38-linux_x86_64.whl")
310
os.system(f"git clone -b queue https://github.com/camenduru/stable-diffusion-webui /home/user/app/stable-diffusion-webui")
411
os.system(f"wget -q https://huggingface.co/Linaqruf/anything-v3.0/resolve/main/Anything-V3.0-pruned.ckpt -O /home/user/app/stable-diffusion-webui/models/Stable-diffusion/Anything-V3.0-pruned.ckpt")
512
os.system(f"wget -q https://huggingface.co/Linaqruf/anything-v3.0/resolve/main/Anything-V3.0.vae.pt -O /home/user/app/stable-diffusion-webui/models/Stable-diffusion/Anything-V3.0-pruned.vae.pt")

0 commit comments

Comments
 (0)