Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
import os
|
2 |
from subprocess import getoutput
|
3 |
gpu_info = getoutput('nvidia-smi')
|
4 |
-
print(gpu_info)
|
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):
|
@@ -17,6 +16,5 @@ os.system(f"sed -i -e '/settings_interface, \"Settings\", \"settings\"/d' /home/
|
|
17 |
os.system(f"sed -i -e '/extensions_interface, \"Extensions\", \"extensions\"/d' /home/user/app/stable-diffusion-webui/modules/ui.py")
|
18 |
# ---------------------------------------------------------------------------------------------------------------------------------------------------
|
19 |
os.system(f"sed -i -e 's/shared.demo.launch/shared.demo.queue().launch/g' /home/user/app/stable-diffusion-webui/webui.py")
|
20 |
-
|
21 |
-
print(webui_py)
|
22 |
os.system(f"python launch.py --force-enable-xformers --disable-console-progressbars --enable-console-prompts --ui-config-file /home/user/app/ui-config.json --ui-settings-file /home/user/app/config.json --cors-allow-origins huggingface.co,hf.space")
|
|
|
1 |
import os
|
2 |
from subprocess import getoutput
|
3 |
gpu_info = getoutput('nvidia-smi')
|
|
|
4 |
if("A10G" in gpu_info):
|
5 |
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")
|
6 |
elif("T4" in gpu_info):
|
|
|
16 |
os.system(f"sed -i -e '/extensions_interface, \"Extensions\", \"extensions\"/d' /home/user/app/stable-diffusion-webui/modules/ui.py")
|
17 |
# ---------------------------------------------------------------------------------------------------------------------------------------------------
|
18 |
os.system(f"sed -i -e 's/shared.demo.launch/shared.demo.queue().launch/g' /home/user/app/stable-diffusion-webui/webui.py")
|
19 |
+
os.system(f'''sed -i -e "s/document.getElementsByTagName('gradio-app')\[0\].shadowRoot/document/g" /home/user/app/stable-diffusion-webui/script.js''')
|
|
|
20 |
os.system(f"python launch.py --force-enable-xformers --disable-console-progressbars --enable-console-prompts --ui-config-file /home/user/app/ui-config.json --ui-settings-file /home/user/app/config.json --cors-allow-origins huggingface.co,hf.space")
|