Spaces:
Runtime error
Runtime error
vorstcavry
commited on
Commit
•
5cf37da
1
Parent(s):
4aff466
Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,16 @@
|
|
1 |
"""
|
2 |
-
|
|
|
|
|
3 |
"""
|
4 |
-
commit_id=r"5ef669de080814067961f28357256e8fe27544f4" #Version 1.
|
5 |
import os
|
6 |
from sys import executable
|
7 |
import subprocess
|
8 |
import pathlib
|
9 |
import gc
|
10 |
-
|
|
|
11 |
def Gitclone(URI:str,ClonePath:pathlib.Path ) -> int :
|
12 |
if pathlib.Path.exists(ClonePath):
|
13 |
return 0
|
@@ -38,17 +41,33 @@ os.chdir(str(user_home))
|
|
38 |
#clone stable-diffusion-webui repo
|
39 |
print("cloning stable-diffusion-webui repo")
|
40 |
Gitclone(r"https://github.com/AUTOMATIC1111/stable-diffusion-webui.git",user_home / r"stable-diffusion-webui")
|
41 |
-
os.chdir(str(user_home / r"stable-diffusion-webui"))
|
42 |
-
os.system("git reset --hard "+commit_id)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
#install extensions
|
44 |
print("installing extensions")
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
|
49 |
DownLoad(r"https://huggingface.co/embed/upscale/resolve/main/4x-UltraSharp.pth",user_home / r"stable-diffusion-webui" / r"models" / r"ESRGAN" ,r"4x-UltraSharp.pth")
|
50 |
while (True):
|
51 |
-
i=subprocess.run([r"wget",r"https://raw.githubusercontent.com/
|
52 |
if(i.returncode == 0 ):
|
53 |
del i
|
54 |
gc.collect()
|
@@ -57,35 +76,39 @@ while (True):
|
|
57 |
del i
|
58 |
#Gitclone(r"https://github.com/deforum-art/deforum-for-automatic1111-webui",user_home / r"stable-diffusion-webui" / r"extensions" / r"deforum-for-automatic1111-webui" )
|
59 |
#Gitclone(r"https://github.com/AlUlkesh/stable-diffusion-webui-images-browser",user_home / r"stable-diffusion-webui" / r"extensions"/ r"stable-diffusion-webui-images-browser")
|
60 |
-
|
61 |
Gitclone(r"https://github.com/BlafKing/sd-civitai-browser-plus",user_home / r"stable-diffusion-webui" / r"extensions" / r"civitai-browser")
|
62 |
Gitclone(r"https://github.com/kohya-ss/sd-webui-additional-networks",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-additional-networks")
|
63 |
Gitclone(r"https://github.com/Mikubill/sd-webui-controlnet",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-controlnet")
|
64 |
Gitclone(r"https://github.com/fkunn1326/openpose-editor",user_home / r"stable-diffusion-webui" / r"extensions" / r"openpose-editor")
|
|
|
65 |
#Gitclone(r"https://github.com/jexom/sd-webui-depth-lib",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-depth-lib")
|
66 |
#Gitclone(r"https://github.com/hnmr293/posex",user_home / r"stable-diffusion-webui" / r"extensions" / r"posex")
|
67 |
#Gitclone(r"https://github.com/nonnonstop/sd-webui-3d-open-pose-editor",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-3d-open-pose-editor")
|
68 |
-
Gitclone(r"https://
|
69 |
-
Gitclone(r"https://github.com/
|
70 |
Gitclone(r"https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git" , user_home / r"stable-diffusion-webui" / r"extensions" / r"a1111-sd-webui-tagcomplete")
|
71 |
-
|
72 |
Gitclone(r"https://github.com/etherealxx/batchlinks-webui",user_home / r"stable-diffusion-webui" / r"extensions" / r"batchlinks-webui")
|
73 |
Gitclone(r"https://github.com/zanllp/sd-webui-infinite-image-browsing",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-infinite-image-browsing")
|
74 |
#Gitclone(r"https://github.com/catppuccin/stable-diffusion-webui",user_home / r"stable-diffusion-webui" / r"extensions" / r"stable-diffusion-webui-catppuccin")
|
75 |
-
Gitclone(r"https://github.com/AUTOMATIC1111/stable-diffusion-webui-rembg",user_home / r"stable-diffusion-webui" / r"extensions" / r"stable-diffusion-webui-rembg")
|
76 |
Gitclone(r"https://tinyurl.com/aspect-ratio-v",user_home / r"stable-diffusion-webui" / r"extensions" / r"aspect-ratio")
|
77 |
-
Gitclone(r"https://
|
78 |
-
|
79 |
Gitclone(r"https://github.com/IDEA-Research/DWPose",user_home / r"stable-diffusion-webui" / r"extensions" / r"DWPose")
|
80 |
Gitclone(r"https://github.com/Bing-su/adetailer",user_home / r"stable-diffusion-webui" / r"extensions" / r"adetailer")
|
81 |
Gitclone(r"https://github.com/NoCrypt/sd_hf_out",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd_hf_out")
|
82 |
-
|
|
|
|
|
|
|
83 |
#Gitclone(r"https://github.com/AIrjen/OneButtonPrompt",user_home / r"stable-diffusion-webui" / r"extensions" / r"OneButtonPrompt")
|
84 |
#Gitclone(r"https://github.com/AUTOMATIC1111/stable-diffusion-webui-wildcards",user_home / r"stable-diffusion-webui" / r"extensions" / r"stable-diffusion-webui-wildcards")
|
85 |
#Gitclone(r"https://github.com/adieyal/sd-dynamic-prompts",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-dynamic-prompts")
|
86 |
#Gitclone(r"https://github.com/d8ahazard/sd_dreambooth_extension",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd_dreambooth_extension")
|
87 |
#Gitclone(r"https://github.com/yfszzx/stable-diffusion-webui-inspiration",user_home / r"stable-diffusion-webui" / r"extensions" / r"stable-diffusion-webui-inspiration")
|
88 |
-
Gitclone(r"https://github.com/Coyote-A/ultimate-upscale-for-automatic1111",user_home / r"stable-diffusion-webui" / r"extensions" / r"ultimate-upscale-for-automatic1111")
|
89 |
os.chdir(user_home / r"stable-diffusion-webui")
|
90 |
#download ControlNet models
|
91 |
print("extensions dolwnload done .\ndownloading ControlNet models")
|
@@ -96,6 +119,7 @@ dList =[ r"https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensor
|
|
96 |
r"https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_canny_fp16.safetensors"]
|
97 |
for i in range(0,len(dList)): DownLoad(dList[i],user_home / r"stable-diffusion-webui" / r"models" / r"ControlNet",pathlib.Path(dList[i]).name)
|
98 |
del dList
|
|
|
99 |
#download ControlNet models
|
100 |
#print("extensions dolwnload done .\ndownloading ControlNet models")
|
101 |
#dList =[r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_ip2p_fp16.safetensors",
|
@@ -104,17 +128,17 @@ del dList
|
|
104 |
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11f1p_sd15_depth_fp16.safetensors",
|
105 |
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_inpaint_fp16.safetensors",
|
106 |
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_lineart_fp16.safetensors",
|
107 |
-
|
108 |
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_normalbae_fp16.safetensors",
|
109 |
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_openpose_fp16.safetensors",
|
110 |
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_scribble_fp16.safetensors",
|
111 |
-
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_seg_fp16.safetensors"
|
112 |
-
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_softedge_fp16.
|
113 |
-
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15s2_lineart_anime_fp16.
|
114 |
-
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11f1e_sd15_tile_fp16.safetensors
|
115 |
-
# r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11e_sd15_ip2p_fp16.yaml"
|
116 |
-
# r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11e_sd15_shuffle_fp16.
|
117 |
-
# r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_canny_fp16.yaml"
|
118 |
# r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11f1p_sd15_depth_fp16.yaml",
|
119 |
# r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_inpaint_fp16.yaml",
|
120 |
# r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_lineart_fp16.yaml",
|
@@ -139,9 +163,9 @@ del dList
|
|
139 |
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_zoedepth_sd15v1.pth"]
|
140 |
#for i in range(0,len(dList)): DownLoad(dList[i],user_home / r"stable-diffusion-webui" / r"extensions" / "sd-webui-controlnet" / r"models",pathlib.Path(dList[i]).name)
|
141 |
#del dList
|
142 |
-
#
|
143 |
#you can change model download address here
|
144 |
-
|
145 |
#Stable Diffusion Checkpoint Model
|
146 |
#anything version4.5
|
147 |
#DownLoad(r"https://huggingface.co/ckpt/anything-v4.0/resolve/main/anything-v4.5-pruned.ckpt",user_home / r"stable-diffusion-webui" / r"models" / r"Stable-diffusion" / r"Checkpoint",r"anything-v4.5-pruned.ckpt")
|
@@ -175,9 +199,9 @@ DownLoad(r"https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/mai
|
|
175 |
#Backlighting
|
176 |
#DownLoad(r"https://civitai.com/api/download/models/39164",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-additional-networks" / r"models"/ r"lora",r"backlighting.safetensors")
|
177 |
#DownLoad(r"https://civitai.com/api/download/models/39164",user_home / r"stable-diffusion-webui" / r"models"/ r"lora",r"backlighting.safetensors")
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
|
182 |
|
183 |
|
@@ -208,7 +232,8 @@ args = [
|
|
208 |
"--skip-torch-cuda-test",
|
209 |
"--enable-console-prompts",
|
210 |
"--ui-settings-file=" + str(pathlib.Path(__file__).parent / "config.json"),
|
211 |
-
|
|
|
212 |
]
|
213 |
|
214 |
args = [arg.as_posix() if isinstance(arg, pathlib.PosixPath) else arg for arg in args]
|
@@ -217,3 +242,4 @@ try:
|
|
217 |
ret = subprocess.run(args)
|
218 |
except Exception as e:
|
219 |
print("Error:", e)
|
|
|
|
1 |
"""
|
2 |
+
Stable Diffusion Webui Version 1.6
|
3 |
+
https://github.com/AUTOMATIC1111/stable-diffusion-webui/releases/tag/v1.6.0
|
4 |
+
|
5 |
"""
|
6 |
+
#commit_id=r"5ef669de080814067961f28357256e8fe27544f4" #Version 1.6.0
|
7 |
import os
|
8 |
from sys import executable
|
9 |
import subprocess
|
10 |
import pathlib
|
11 |
import gc
|
12 |
+
import time
|
13 |
+
import subprocess
|
14 |
def Gitclone(URI:str,ClonePath:pathlib.Path ) -> int :
|
15 |
if pathlib.Path.exists(ClonePath):
|
16 |
return 0
|
|
|
41 |
#clone stable-diffusion-webui repo
|
42 |
print("cloning stable-diffusion-webui repo")
|
43 |
Gitclone(r"https://github.com/AUTOMATIC1111/stable-diffusion-webui.git",user_home / r"stable-diffusion-webui")
|
44 |
+
#os.chdir(str(user_home / r"stable-diffusion-webui"))
|
45 |
+
#os.system("git reset --hard "+commit_id)
|
46 |
+
os.chdir(user_home / r"stable-diffusion-webui")
|
47 |
+
Gitclone(r"https://github.com/vorstcavry/ncpt_colab_timer",user_home / r"stable-diffusion-webui" / r"extensions" / r"ncpt_colab_timer")
|
48 |
+
Gitclone(r"https://github.com/vorstcavry/static",user_home / r"stable-diffusion-webui" / r"static")
|
49 |
+
|
50 |
+
def run_echo_command():
|
51 |
+
try:
|
52 |
+
start_huggingface
|
53 |
+
except NameError:
|
54 |
+
start_huggingface = int(time.time()) - 5
|
55 |
+
|
56 |
+
cmd = f"echo -n {start_huggingface} > /home/user/app/stable-diffusion-webui/static/colabTimer.txt"
|
57 |
+
subprocess.run(cmd, shell=True)
|
58 |
+
|
59 |
+
# Contoh pemanggilan fungsi run_echo_command:
|
60 |
+
run_echo_command()
|
61 |
+
os.chdir(user_home / r"stable-diffusion-webui")
|
62 |
#install extensions
|
63 |
print("installing extensions")
|
64 |
+
Gitclone(r"https://github.com/vorstcavry/embeddings",user_home / r"stable-diffusion-webui" / r"embeddings" / r"negative")
|
65 |
+
Gitclone(r"https://github.com/vorstcavry/lora",user_home / r"stable-diffusion-webui" / r"models" / r"Lora" / r"positive")
|
66 |
+
Gitclone(r"https://github.com/vorstcavry/Checkpoint-Model",user_home / r"stable-diffusion-webui" / r"models" / r"Stable-diffusion" / r"Checkpoint")
|
67 |
|
68 |
DownLoad(r"https://huggingface.co/embed/upscale/resolve/main/4x-UltraSharp.pth",user_home / r"stable-diffusion-webui" / r"models" / r"ESRGAN" ,r"4x-UltraSharp.pth")
|
69 |
while (True):
|
70 |
+
i=subprocess.run([r"wget",r"https://raw.githubusercontent.com/camenduru/stable-diffusion-webui-scripts/main/run_n_times.py",r"-O",str(user_home / r"stable-diffusion-webui" / r"scripts" / r"run_n_times.py")])
|
71 |
if(i.returncode == 0 ):
|
72 |
del i
|
73 |
gc.collect()
|
|
|
76 |
del i
|
77 |
#Gitclone(r"https://github.com/deforum-art/deforum-for-automatic1111-webui",user_home / r"stable-diffusion-webui" / r"extensions" / r"deforum-for-automatic1111-webui" )
|
78 |
#Gitclone(r"https://github.com/AlUlkesh/stable-diffusion-webui-images-browser",user_home / r"stable-diffusion-webui" / r"extensions"/ r"stable-diffusion-webui-images-browser")
|
79 |
+
Gitclone(r"https://github.com/camenduru/stable-diffusion-webui-huggingface",user_home / r"stable-diffusion-webui" / r"extensions" / r"stable-diffusion-webui-huggingface")
|
80 |
Gitclone(r"https://github.com/BlafKing/sd-civitai-browser-plus",user_home / r"stable-diffusion-webui" / r"extensions" / r"civitai-browser")
|
81 |
Gitclone(r"https://github.com/kohya-ss/sd-webui-additional-networks",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-additional-networks")
|
82 |
Gitclone(r"https://github.com/Mikubill/sd-webui-controlnet",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-controlnet")
|
83 |
Gitclone(r"https://github.com/fkunn1326/openpose-editor",user_home / r"stable-diffusion-webui" / r"extensions" / r"openpose-editor")
|
84 |
+
Gitclone(r"https://tinyurl.com/LOBE-Repo",user_home / r"stable-diffusion-webui" / r"extensions" / r"LOBE")
|
85 |
#Gitclone(r"https://github.com/jexom/sd-webui-depth-lib",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-depth-lib")
|
86 |
#Gitclone(r"https://github.com/hnmr293/posex",user_home / r"stable-diffusion-webui" / r"extensions" / r"posex")
|
87 |
#Gitclone(r"https://github.com/nonnonstop/sd-webui-3d-open-pose-editor",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-3d-open-pose-editor")
|
88 |
+
#Gitclone(r"https://github.com/hnmr293/posex",user_home / r"stable-diffusion-webui" / r"extensions" / r"posex")
|
89 |
+
Gitclone(r"https://github.com/EdithForsaken/sd-webui-cloud-inference.git",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-cloud-inference")
|
90 |
Gitclone(r"https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git" , user_home / r"stable-diffusion-webui" / r"extensions" / r"a1111-sd-webui-tagcomplete")
|
91 |
+
Gitclone(r"https://github.com/camenduru/sd-webui-tunnels",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-tunnels")
|
92 |
Gitclone(r"https://github.com/etherealxx/batchlinks-webui",user_home / r"stable-diffusion-webui" / r"extensions" / r"batchlinks-webui")
|
93 |
Gitclone(r"https://github.com/zanllp/sd-webui-infinite-image-browsing",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-infinite-image-browsing")
|
94 |
#Gitclone(r"https://github.com/catppuccin/stable-diffusion-webui",user_home / r"stable-diffusion-webui" / r"extensions" / r"stable-diffusion-webui-catppuccin")
|
95 |
+
#Gitclone(r"https://github.com/AUTOMATIC1111/stable-diffusion-webui-rembg",user_home / r"stable-diffusion-webui" / r"extensions" / r"stable-diffusion-webui-rembg")
|
96 |
Gitclone(r"https://tinyurl.com/aspect-ratio-v",user_home / r"stable-diffusion-webui" / r"extensions" / r"aspect-ratio")
|
97 |
+
#Gitclone(r"https://github.com/vorstcavry/cleaner",user_home / r"stable-diffusion-webui" / r"extensions" / r"cleaner")
|
98 |
+
Gitclone(r"https://github.com/hnmr293/sd-webui-llul",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-llul")
|
99 |
Gitclone(r"https://github.com/IDEA-Research/DWPose",user_home / r"stable-diffusion-webui" / r"extensions" / r"DWPose")
|
100 |
Gitclone(r"https://github.com/Bing-su/adetailer",user_home / r"stable-diffusion-webui" / r"extensions" / r"adetailer")
|
101 |
Gitclone(r"https://github.com/NoCrypt/sd_hf_out",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd_hf_out")
|
102 |
+
|
103 |
+
|
104 |
+
#Gitclone(r"https://github.com/NoCrypt/sd_hf_out",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd_hf_out")
|
105 |
+
#Gitclone(r"https://github.com/Iyashinouta/sd-model-downloader",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-model-downloader")
|
106 |
#Gitclone(r"https://github.com/AIrjen/OneButtonPrompt",user_home / r"stable-diffusion-webui" / r"extensions" / r"OneButtonPrompt")
|
107 |
#Gitclone(r"https://github.com/AUTOMATIC1111/stable-diffusion-webui-wildcards",user_home / r"stable-diffusion-webui" / r"extensions" / r"stable-diffusion-webui-wildcards")
|
108 |
#Gitclone(r"https://github.com/adieyal/sd-dynamic-prompts",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-dynamic-prompts")
|
109 |
#Gitclone(r"https://github.com/d8ahazard/sd_dreambooth_extension",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd_dreambooth_extension")
|
110 |
#Gitclone(r"https://github.com/yfszzx/stable-diffusion-webui-inspiration",user_home / r"stable-diffusion-webui" / r"extensions" / r"stable-diffusion-webui-inspiration")
|
111 |
+
#Gitclone(r"https://github.com/Coyote-A/ultimate-upscale-for-automatic1111",user_home / r"stable-diffusion-webui" / r"extensions" / r"ultimate-upscale-for-automatic1111")
|
112 |
os.chdir(user_home / r"stable-diffusion-webui")
|
113 |
#download ControlNet models
|
114 |
print("extensions dolwnload done .\ndownloading ControlNet models")
|
|
|
119 |
r"https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_canny_fp16.safetensors"]
|
120 |
for i in range(0,len(dList)): DownLoad(dList[i],user_home / r"stable-diffusion-webui" / r"models" / r"ControlNet",pathlib.Path(dList[i]).name)
|
121 |
del dList
|
122 |
+
|
123 |
#download ControlNet models
|
124 |
#print("extensions dolwnload done .\ndownloading ControlNet models")
|
125 |
#dList =[r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_ip2p_fp16.safetensors",
|
|
|
128 |
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11f1p_sd15_depth_fp16.safetensors",
|
129 |
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_inpaint_fp16.safetensors",
|
130 |
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_lineart_fp16.safetensors",
|
131 |
+
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_mlsd_fp16.safetensors",
|
132 |
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_normalbae_fp16.safetensors",
|
133 |
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_openpose_fp16.safetensors",
|
134 |
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_scribble_fp16.safetensors",
|
135 |
+
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_seg_fp16.safetensors",
|
136 |
+
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_softedge_fp16.safetensors",
|
137 |
+
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15s2_lineart_anime_fp16.safetensors",
|
138 |
+
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11f1e_sd15_tile_fp16.safetensors",
|
139 |
+
# r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11e_sd15_ip2p_fp16.yaml",
|
140 |
+
# r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11e_sd15_shuffle_fp16.yaml",
|
141 |
+
# r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_canny_fp16.yaml",
|
142 |
# r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11f1p_sd15_depth_fp16.yaml",
|
143 |
# r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_inpaint_fp16.yaml",
|
144 |
# r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_lineart_fp16.yaml",
|
|
|
163 |
# r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_zoedepth_sd15v1.pth"]
|
164 |
#for i in range(0,len(dList)): DownLoad(dList[i],user_home / r"stable-diffusion-webui" / r"extensions" / "sd-webui-controlnet" / r"models",pathlib.Path(dList[i]).name)
|
165 |
#del dList
|
166 |
+
#download model
|
167 |
#you can change model download address here
|
168 |
+
print("ControlNet models download done.\ndownloading model")
|
169 |
#Stable Diffusion Checkpoint Model
|
170 |
#anything version4.5
|
171 |
#DownLoad(r"https://huggingface.co/ckpt/anything-v4.0/resolve/main/anything-v4.5-pruned.ckpt",user_home / r"stable-diffusion-webui" / r"models" / r"Stable-diffusion" / r"Checkpoint",r"anything-v4.5-pruned.ckpt")
|
|
|
199 |
#Backlighting
|
200 |
#DownLoad(r"https://civitai.com/api/download/models/39164",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-additional-networks" / r"models"/ r"lora",r"backlighting.safetensors")
|
201 |
#DownLoad(r"https://civitai.com/api/download/models/39164",user_home / r"stable-diffusion-webui" / r"models"/ r"lora",r"backlighting.safetensors")
|
202 |
+
DownLoad(r"https://huggingface.co/vorstcavry/loraasia1/resolve/main/japaneseDollLikeness_v15.safetensors",user_home / r"stable-diffusion-webui" / r"models"/ r"lora",r"japaneseDollLikeness_v15.safetensors")
|
203 |
+
DownLoad(r"https://huggingface.co/vorstcavry/loraasia1/resolve/main/koreanDollLikeness_v20.safetensors",user_home / r"stable-diffusion-webui" / r"models"/ r"lora",r"koreanDollLikeness_v20.safetensors")
|
204 |
+
DownLoad(r"https://huggingface.co/vorstcavry/loraasia1/resolve/main/taiwanDollLikeness_v15.safetensors",user_home / r"stable-diffusion-webui" / r"models"/ r"lora",r"taiwanDollLikeness_v15.safetensors")
|
205 |
|
206 |
|
207 |
|
|
|
232 |
"--skip-torch-cuda-test",
|
233 |
"--enable-console-prompts",
|
234 |
"--ui-settings-file=" + str(pathlib.Path(__file__).parent / "config.json"),
|
235 |
+
"--hf-token-out",
|
236 |
+
"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" # Gantilah dengan token yang sesuai
|
237 |
]
|
238 |
|
239 |
args = [arg.as_posix() if isinstance(arg, pathlib.PosixPath) else arg for arg in args]
|
|
|
242 |
ret = subprocess.run(args)
|
243 |
except Exception as e:
|
244 |
print("Error:", e)
|
245 |
+
del os ,user_home ,pyexecutable ,subprocess
|