DreamSunny commited on
Commit
bc31e1b
1 Parent(s): dd1175b

add exegesis

Browse files
Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -1,7 +1,11 @@
1
  import os
2
  user_home = r"/home/user/app"
3
  os.chdir(user_home)
 
 
4
  os.system("git clone \"https://github.com/AUTOMATIC1111/stable-diffusion-webui.git\" "+user_home+r"/stable-diffusion-webui")
 
 
5
  os.system(r"git clone !git clone https://huggingface.co/embed/negative "+user_home+"/stable-diffusion-webui/embeddings/negative")
6
  os.system(r"git clone https://huggingface.co/embed/lora "+user_home+"/stable-diffusion-webui/models/Lora/positive")
7
  os.system(r"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/embed/upscale/resolve/main/4x-UltraSharp.pth -d "+user_home+"/stable-diffusion-webui/models/ESRGAN -o 4x-UltraSharp.ptharia2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/embed/upscale/resolve/main/4x-UltraSharp.pth -d "+user_home+"/stable-diffusion-webui/models/ESRGAN -o 4x-UltraSharp.pth")
@@ -16,7 +20,8 @@ os.system(r"git clone https://github.com/fkunn1326/openpose-editor "+user_home+"
16
  os.system(r"git clone https://github.com/jexom/sd-webui-depth-lib "+user_home+"/stable-diffusion-webui/extensions/sd-webui-depth-lib")
17
  os.system(r"git clone https://github.com/hnmr293/posex "+user_home+"/stable-diffusion-webui/extensions/posex")
18
  os.system(r"git clone https://github.com/nonnonstop/sd-webui-3d-open-pose-editor "+user_home+"/stable-diffusion-webui/extensions/sd-webui-3d-open-pose-editor")
19
- os.system(r"git clone https://github.com/dtlnor/stable-diffusion-webui-localization-zh_CN.git "+user_home+"/stable-diffusion-webui/extensions/stable-diffusion-webui-localization-zh_CN")
 
20
  os.system(r"git clone https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git "+user_home+"/stable-diffusion-webui/extensions/a1111-sd-webui-tagcomplete")
21
  os.system(r"git clone https://github.com/camenduru/sd-webui-tunnels "+user_home+"/stable-diffusion-webui/extensions/sd-webui-tunnels")
22
  os.system(r"git clone https://github.com/etherealxx/batchlinks-webui "+user_home+"/stable-diffusion-webui/extensions/batchlinks-webui")
@@ -29,6 +34,8 @@ os.chdir(os.path.join(user_home,r"stable-diffusion-webui"))
29
  os.system(r"git reset --hard")
30
  os.system(r"git -C "+user_home+"/stable-diffusion-webui/repositories/stable-diffusion-stability-ai reset --hard")
31
 
 
 
32
  os.system(r"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_ip2p_fp16.safetensors -d "+user_home+""+user_home+"/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11e_sd15_ip2p_fp16.safetensors")
33
  os.system(r"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_shuffle_fp16.safetensors -d "+user_home+"/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11e_sd15_shuffle_fp16.safetensors")
34
  os.system(r"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_canny_fp16.safetensors -d "+user_home+"/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15_canny_fp16.safetensors")
@@ -74,9 +81,15 @@ try:
74
  os.mkdir(os.path.join(user_home,"stable-diffusion-webui/models/Stable-diffusion"))
75
  except(FileExistsError):
76
  print("exist")
 
 
 
 
77
  os.system(r"aria2c https://huggingface.co/ckpt/anything-v4.0/resolve/main/anything-v4.5-pruned.ckpt -d "+user_home+"/stable-diffusion-webui/models/Stable-diffusion -o anything-v4.5-pruned.ckpt")
78
  os.system(r"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/anything-v4.0/resolve/main/anything-v4.0.vae.pt -d "+user_home+"/stable-diffusion-webui/models/Stable-diffusion -o anything-v4.5-pruned.vae.pt")
79
 
 
 
80
  os.system(r"python3 launch.py --precision full --no-half --no-half-vae --enable-insecure-extension-access --medvram --skip-torch-cuda-test ")
81
 
82
 
 
1
  import os
2
  user_home = r"/home/user/app"
3
  os.chdir(user_home)
4
+ #clone stable-diffusion-webui repo
5
+ print("cloning stable-diffusion-webui repo")
6
  os.system("git clone \"https://github.com/AUTOMATIC1111/stable-diffusion-webui.git\" "+user_home+r"/stable-diffusion-webui")
7
+ #install extensions
8
+ print("installing extensions")
9
  os.system(r"git clone !git clone https://huggingface.co/embed/negative "+user_home+"/stable-diffusion-webui/embeddings/negative")
10
  os.system(r"git clone https://huggingface.co/embed/lora "+user_home+"/stable-diffusion-webui/models/Lora/positive")
11
  os.system(r"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/embed/upscale/resolve/main/4x-UltraSharp.pth -d "+user_home+"/stable-diffusion-webui/models/ESRGAN -o 4x-UltraSharp.ptharia2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/embed/upscale/resolve/main/4x-UltraSharp.pth -d "+user_home+"/stable-diffusion-webui/models/ESRGAN -o 4x-UltraSharp.pth")
 
20
  os.system(r"git clone https://github.com/jexom/sd-webui-depth-lib "+user_home+"/stable-diffusion-webui/extensions/sd-webui-depth-lib")
21
  os.system(r"git clone https://github.com/hnmr293/posex "+user_home+"/stable-diffusion-webui/extensions/posex")
22
  os.system(r"git clone https://github.com/nonnonstop/sd-webui-3d-open-pose-editor "+user_home+"/stable-diffusion-webui/extensions/sd-webui-3d-open-pose-editor")
23
+ #中文本地化的请解除下一行的注释
24
+ #os.system(r"git clone https://github.com/dtlnor/stable-diffusion-webui-localization-zh_CN.git "+user_home+"/stable-diffusion-webui/extensions/stable-diffusion-webui-localization-zh_CN")
25
  os.system(r"git clone https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git "+user_home+"/stable-diffusion-webui/extensions/a1111-sd-webui-tagcomplete")
26
  os.system(r"git clone https://github.com/camenduru/sd-webui-tunnels "+user_home+"/stable-diffusion-webui/extensions/sd-webui-tunnels")
27
  os.system(r"git clone https://github.com/etherealxx/batchlinks-webui "+user_home+"/stable-diffusion-webui/extensions/batchlinks-webui")
 
34
  os.system(r"git reset --hard")
35
  os.system(r"git -C "+user_home+"/stable-diffusion-webui/repositories/stable-diffusion-stability-ai reset --hard")
36
 
37
+ #download ControlNet models
38
+ print("downloading ControlNet models")
39
  os.system(r"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_ip2p_fp16.safetensors -d "+user_home+""+user_home+"/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11e_sd15_ip2p_fp16.safetensors")
40
  os.system(r"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_shuffle_fp16.safetensors -d "+user_home+"/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11e_sd15_shuffle_fp16.safetensors")
41
  os.system(r"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_canny_fp16.safetensors -d "+user_home+"/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15_canny_fp16.safetensors")
 
81
  os.mkdir(os.path.join(user_home,"stable-diffusion-webui/models/Stable-diffusion"))
82
  except(FileExistsError):
83
  print("exist")
84
+
85
+ #download model
86
+ #you can change model download address here
87
+ print("downloading model")
88
  os.system(r"aria2c https://huggingface.co/ckpt/anything-v4.0/resolve/main/anything-v4.5-pruned.ckpt -d "+user_home+"/stable-diffusion-webui/models/Stable-diffusion -o anything-v4.5-pruned.ckpt")
89
  os.system(r"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/anything-v4.0/resolve/main/anything-v4.0.vae.pt -d "+user_home+"/stable-diffusion-webui/models/Stable-diffusion -o anything-v4.5-pruned.vae.pt")
90
 
91
+ #strt webui
92
+ print("Done\nStarting Webui...")
93
  os.system(r"python3 launch.py --precision full --no-half --no-half-vae --enable-insecure-extension-access --medvram --skip-torch-cuda-test ")
94
 
95