Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import os
|
|
|
|
| 2 |
os.chdir(f"/home/user/app")
|
| 3 |
os.system(f"git clone -b v2.6 https://github.com/camenduru/stable-diffusion-webui /home/user/app/stable-diffusion-webui")
|
| 4 |
os.chdir(f"/home/user/app/stable-diffusion-webui")
|
|
@@ -13,4 +14,7 @@ os.system(f"sed -i -e '225,227d' /home/user/app/stable-diffusion-webui/modules/u
|
|
| 13 |
os.system(f"sed -i -e '214,217d' /home/user/app/stable-diffusion-webui/modules/ui_loadsave.py")
|
| 14 |
os.system(f"rm -rfv /home/user/app/stable-diffusion-webui/scripts/")
|
| 15 |
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/counterfeit-xl/resolve/main/counterfeitxl_v10.safetensors -d /home/user/app/stable-diffusion-webui/models/Stable-diffusion -o counterfeitxl_v10.safetensors")
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import os
|
| 2 |
+
import torch
|
| 3 |
os.chdir(f"/home/user/app")
|
| 4 |
os.system(f"git clone -b v2.6 https://github.com/camenduru/stable-diffusion-webui /home/user/app/stable-diffusion-webui")
|
| 5 |
os.chdir(f"/home/user/app/stable-diffusion-webui")
|
|
|
|
| 14 |
os.system(f"sed -i -e '214,217d' /home/user/app/stable-diffusion-webui/modules/ui_loadsave.py")
|
| 15 |
os.system(f"rm -rfv /home/user/app/stable-diffusion-webui/scripts/")
|
| 16 |
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/counterfeit-xl/resolve/main/counterfeitxl_v10.safetensors -d /home/user/app/stable-diffusion-webui/models/Stable-diffusion -o counterfeitxl_v10.safetensors")
|
| 17 |
+
if torch.cuda.is_available():
|
| 18 |
+
os.system(f"python launch.py --skip-torch-cuda-test --cors-allow-origins=* --xformers --theme dark --gradio-queue --ui-settings-file /home/user/app/shared-config_v2.json --ui-config-file /home/user/app/shared-ui-config_v2.json")
|
| 19 |
+
else:
|
| 20 |
+
os.system(f"python launch.py --use-cpu all --precision full --no-half --skip-torch-cuda-test --cors-allow-origins=* --xformers --theme dark --gradio-queue --ui-settings-file /home/user/app/shared-config_v2.json --ui-config-file /home/user/app/shared-ui-config_v2.json")
|