Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,6 +2,9 @@ import os
|
|
| 2 |
from subprocess import getoutput
|
| 3 |
import requests
|
| 4 |
import subprocess
|
|
|
|
|
|
|
|
|
|
| 5 |
gpu_info = getoutput('nvidia-smi')
|
| 6 |
if("A10G" in gpu_info):
|
| 7 |
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")
|
|
@@ -72,7 +75,9 @@ if True:
|
|
| 72 |
f.write(opt.content)
|
| 73 |
os.system(f"wget -q https://raw.githubusercontent.com/Stability-AI/stablediffusion/main/configs/stable-diffusion/v2-inference-v.yaml -O /home/user/app/stable-diffusion-webui/models/Stable-diffusion/v2-1_768-ema-pruned.yaml")
|
| 74 |
os.listdir("/home/user/app/stable-diffusion-webui/models/Stable-diffusion/")
|
| 75 |
-
command ="python
|
| 76 |
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
|
|
|
|
|
|
|
| 77 |
os.system(f"python launch.py --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")
|
| 78 |
|
|
|
|
| 2 |
from subprocess import getoutput
|
| 3 |
import requests
|
| 4 |
import subprocess
|
| 5 |
+
os.system("pip install py-localtunnel")
|
| 6 |
+
|
| 7 |
+
|
| 8 |
gpu_info = getoutput('nvidia-smi')
|
| 9 |
if("A10G" in gpu_info):
|
| 10 |
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")
|
|
|
|
| 75 |
f.write(opt.content)
|
| 76 |
os.system(f"wget -q https://raw.githubusercontent.com/Stability-AI/stablediffusion/main/configs/stable-diffusion/v2-inference-v.yaml -O /home/user/app/stable-diffusion-webui/models/Stable-diffusion/v2-1_768-ema-pruned.yaml")
|
| 77 |
os.listdir("/home/user/app/stable-diffusion-webui/models/Stable-diffusion/")
|
| 78 |
+
command =["python","-m","http.server","9393","--directory","/home/user/app/stable-diffusion-webui/models/Stable-diffusion/"]
|
| 79 |
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
|
| 80 |
+
command2=["pylt","port","9393","-s","scafile"]
|
| 81 |
+
process = subprocess.Popen(command2, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
|
| 82 |
os.system(f"python launch.py --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")
|
| 83 |
|