RSPMetaAdmin commited on
Commit
f8999e7
1 Parent(s): 624ce02

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -1
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")
@@ -14,4 +15,31 @@ os.system(f"sed -i -e '214,217d' /home/user/app/stable-diffusion-webui/modules/u
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/RSPMetaAdmin/Deliberate_V2/resolve/main/Deliberate_v2.safetensors -d /home/user/app/stable-diffusion-webui/models/Stable-diffusion -o Deliberate_v2.safetensors")
16
  os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/SG161222/Realistic_Vision_V5.1_noVAE/resolve/main/Realistic_Vision_V5.1.safetensors -d /home/user/app/stable-diffusion-webui/models/Stable-diffusion -o Realistic_Vision_V5.1.safetensors")
17
- os.system(f"python launch.py --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")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import os
2
+
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")
 
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/RSPMetaAdmin/Deliberate_V2/resolve/main/Deliberate_v2.safetensors -d /home/user/app/stable-diffusion-webui/models/Stable-diffusion -o Deliberate_v2.safetensors")
17
  os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/SG161222/Realistic_Vision_V5.1_noVAE/resolve/main/Realistic_Vision_V5.1.safetensors -d /home/user/app/stable-diffusion-webui/models/Stable-diffusion -o Realistic_Vision_V5.1.safetensors")
18
+ os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/SG161222/Realistic_Vision_V5.1_noVAE/resolve/main/Realistic_Vision_V5.1.safetensors -d /home/user/app/stable-diffusion-webui/models/Stable-diffusion -o Realistic_Vision_V5.1.safetensors")
19
+ # Cloning the sd-webui-controlnet extension
20
+ os.chdir(f"/home/user/app/stable-diffusion-webui/extensions")
21
+ os.system(f"git clone https://github.com/Mikubill/sd-webui-controlnet.git")
22
+
23
+ # Installing required dependencies (if any)
24
+ os.chdir(f"/home/user/app/stable-diffusion-webui/extensions/sd-webui-controlnet/models")
25
+ os.system(f"wget https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11e_sd15_ip2p.pth")
26
+ os.system(f"wget https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11e_sd15_shuffle.pth")
27
+ os.system(f"wget https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11f1e_sd15_tile.pth")
28
+ os.system(f"wget https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11f1p_sd15_depth.pth")
29
+ os.system(f"wget https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11p_sd15_inpaint.pth")
30
+ os.system(f"wget https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11p_sd15_lineart.pth")
31
+ os.system(f"wget https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11p_sd15_mlsd.pth")
32
+ os.system(f"wget https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11p_sd15_normalbae.pth")
33
+ os.system(f"wget https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11p_sd15_openpose.pth")
34
+ os.system(f"wget https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11p_sd15_scribble.pth")
35
+ os.system(f"wget https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11p_sd15_seg.pth")
36
+ os.system(f"wget https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11p_sd15_softedge.pth")
37
+ os.system(f"wget https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11p_sd15s2_lineart_anime.pth")
38
+
39
+ # Check the extension's documentation for specific dependencies
40
+
41
+ # Modifying configuration files (if necessary)
42
+ # Refer to the extension's documentation for specific instructions
43
+
44
+ # Launching the webui
45
+ os.system(f"python launch.py --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")