import os from subprocess import getoutput gpu_info = getoutput('nvidia-smi') os.system(f"pip install -q triton==2.0.0.dev20221120") if("A10G" in gpu_info): 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): 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 https://github.com/AUTOMATIC1111/stable-diffusion-webui /home/user/app/stable-diffusion-webui")