Skip to content

Commit

Permalink
Check GPU to attribute the right xformers (AUTOMATIC1111#7)
Browse files Browse the repository at this point in the history
- Check GPU to attribute the right xformers (0b07795d5c1011c05517f8a8bfa7fc11d9f90ca0)


Co-authored-by: Multimodal AI art <multimodalart@users.noreply.huggingface.co>
  • Loading branch information
2 people authored and system committed Dec 5, 2022
1 parent 4c3cb76 commit 0b0d8a3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import os
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")
from subprocess import getoutput
gpu_info = getoutput('nvidia-smi')
if("A10G" in gpu_info):
print("Using A10G")
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")
elif("T4" in gpu_info):
print("Using T4")
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")
os.system(f"git clone -b queue https://github.com/camenduru/stable-diffusion-webui /home/user/app/stable-diffusion-webui")
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")
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")
Expand Down

0 comments on commit 0b0d8a3

Please sign in to comment.