Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
@@ -11,26 +11,21 @@ elif("T4" in gpu_info):
|
|
11 |
|
12 |
# os.chdir("/home/user/app/stable-diffusion-webui")
|
13 |
|
14 |
-
os.system(f"pip install google-colab")
|
15 |
-
# Mount our drive
|
16 |
-
from google.colab import drive
|
17 |
-
drive.mount('/content/drive')
|
18 |
-
|
19 |
# Create a folder for storing files
|
20 |
os.system(f"mkdir sd-webui-files")
|
21 |
os.chdir("sd-webui-files")
|
22 |
|
23 |
# # Clone SD WebUI from AUTOMATIC1111's repo
|
24 |
-
|
25 |
|
26 |
# # Download checkpoint models to /stable-diffusion-webui/models/Stable-diffusion
|
27 |
-
|
|
|
28 |
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
# !git pull
|
33 |
-
# !sed -i -e 's/checkout {commithash}/checkout --force {commithash}/g' launch.py
|
34 |
|
|
|
35 |
# Launch WebUI
|
36 |
|
|
|
11 |
|
12 |
# os.chdir("/home/user/app/stable-diffusion-webui")
|
13 |
|
|
|
|
|
|
|
|
|
|
|
14 |
# Create a folder for storing files
|
15 |
os.system(f"mkdir sd-webui-files")
|
16 |
os.chdir("sd-webui-files")
|
17 |
|
18 |
# # Clone SD WebUI from AUTOMATIC1111's repo
|
19 |
+
os.system(f"git clone --depth=1 https://github.com/AUTOMATIC1111/stable-diffusion-webui.git sd-webui-files/stable-diffusion-webui")
|
20 |
|
21 |
# # Download checkpoint models to /stable-diffusion-webui/models/Stable-diffusion
|
22 |
+
os.system(f"wget -nc -P stable-diffusion-webui/models/Stable-diffusion https://huggingface.co/andite/anything-v4.0/resolve/main/anything-v4.5-pruned.safetensors")
|
23 |
+
|
24 |
|
25 |
+
os.system(f"git reset --hard")
|
26 |
+
os.system(f"git pull")
|
27 |
+
os.system(f"sed -i -e 's/checkout {commithash}/checkout --force {commithash}/g' launch.py")
|
|
|
|
|
28 |
|
29 |
+
os.system(f"python launch.py --share --xformers --enable-insecure-extension-access --theme light --skip-torch-cuda-test")
|
30 |
# Launch WebUI
|
31 |
|