darkstorm2150 commited on
Commit
67ff2d2
1 Parent(s): c4941b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -8
app.py CHANGED
@@ -1,12 +1,6 @@
1
  import os
2
  from subprocess import getoutput
3
 
4
- gpu_info = getoutput('nvidia-smi')
5
- if("A10G" in gpu_info):
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
- 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")
9
-
10
  os.system(f"git clone -b v1.5 https://github.com/camenduru/stable-diffusion-webui /home/user/app/stable-diffusion-webui")
11
  os.chdir("/home/user/app/stable-diffusion-webui")
12
 
@@ -38,7 +32,7 @@ if "IS_SHARED_UI" in os.environ:
38
  os.system(f"wget -q {os.getenv('VAE_LINK')} -O /home/user/app/stable-diffusion-webui/models/Stable-diffusion/{os.getenv('VAE_NAME')}")
39
  os.system(f"wget -q {os.getenv('YAML_LINK')} -O /home/user/app/stable-diffusion-webui/models/Stable-diffusion/{os.getenv('YAML_NAME')}")
40
 
41
- os.system(f"python launch.py --force-enable-xformers --disable-console-progressbars --enable-console-prompts --ui-config-file /home/user/app/shared-ui-config.json --ui-settings-file /home/user/app/shared-config.json --cors-allow-origins huggingface.co,hf.space --no-progressbar-hiding")
42
  else:
43
  os.system(f"rm -rfv /home/user/app/stable-diffusion-webui/scripts/")
44
 
@@ -79,4 +73,4 @@ else:
79
  #os.system(f"wget -q https://huggingface.co/darkstorm2150/Protogen_Dragon_Official_Release/resolve/main/ProtoGen_Dragon.safetensors -O /home/user/app/stable-diffusion-webui/models/Stable-diffusion/ProtoGen_Dragon.safetensors")
80
  # ----------------------------Protogen Models----------------------------
81
  #os.system(f"python launch.py --force-enable-xformers --ui-config-file /home/user/app/ui-config.json --ui-settings-file /home/user/app/config.json --disable-console-progressbars --enable-console-prompts --cors-allow-origins huggingface.co,hf.space --no-progressbar-hiding --api --skip-torch-cuda-test")
82
- os.system(f"python launch.py --force-enable-xformers --disable-console-progressbars --enable-console-prompts --ui-config-file /home/user/app/shared-ui-config.json --ui-settings-file /home/user/app/shared-config.json --cors-allow-origins huggingface.co,hf.space --no-progressbar-hiding")
 
1
  import os
2
  from subprocess import getoutput
3
 
 
 
 
 
 
 
4
  os.system(f"git clone -b v1.5 https://github.com/camenduru/stable-diffusion-webui /home/user/app/stable-diffusion-webui")
5
  os.chdir("/home/user/app/stable-diffusion-webui")
6
 
 
32
  os.system(f"wget -q {os.getenv('VAE_LINK')} -O /home/user/app/stable-diffusion-webui/models/Stable-diffusion/{os.getenv('VAE_NAME')}")
33
  os.system(f"wget -q {os.getenv('YAML_LINK')} -O /home/user/app/stable-diffusion-webui/models/Stable-diffusion/{os.getenv('YAML_NAME')}")
34
 
35
+ os.system(f"python launch.py --disable-console-progressbars --enable-console-prompts --ui-config-file /home/user/app/shared-ui-config.json --ui-settings-file /home/user/app/shared-config.json --cors-allow-origins huggingface.co,hf.space --no-progressbar-hiding")
36
  else:
37
  os.system(f"rm -rfv /home/user/app/stable-diffusion-webui/scripts/")
38
 
 
73
  #os.system(f"wget -q https://huggingface.co/darkstorm2150/Protogen_Dragon_Official_Release/resolve/main/ProtoGen_Dragon.safetensors -O /home/user/app/stable-diffusion-webui/models/Stable-diffusion/ProtoGen_Dragon.safetensors")
74
  # ----------------------------Protogen Models----------------------------
75
  #os.system(f"python launch.py --force-enable-xformers --ui-config-file /home/user/app/ui-config.json --ui-settings-file /home/user/app/config.json --disable-console-progressbars --enable-console-prompts --cors-allow-origins huggingface.co,hf.space --no-progressbar-hiding --api --skip-torch-cuda-test")
76
+ os.system(f"python launch.py --disable-console-progressbars --enable-console-prompts --ui-config-file /home/user/app/shared-ui-config.json --ui-settings-file /home/user/app/shared-config.json --cors-allow-origins huggingface.co,hf.space --no-progressbar-hiding")