Upload 4 files
Browse filesFix and faster download.
- app.py +208 -148
- packages.txt +1 -2
- pre-requirements.txt +1 -0
- requirements.txt +39 -38
app.py
CHANGED
@@ -1,149 +1,209 @@
|
|
1 |
-
import os
|
2 |
-
|
3 |
-
import
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
def
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
Gitclone(
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
#
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
#
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
del os ,user_home ,pyexecutable ,subprocess
|
|
|
1 |
+
import os
|
2 |
+
if os.environ.get("SPACES_ZERO_GPU") is not None:
|
3 |
+
import spaces
|
4 |
+
else:
|
5 |
+
class spaces:
|
6 |
+
@staticmethod
|
7 |
+
def GPU(func):
|
8 |
+
def wrapper(*args, **kwargs):
|
9 |
+
return func(*args, **kwargs)
|
10 |
+
return wrapper
|
11 |
+
from sys import executable as pyexecutable
|
12 |
+
import subprocess
|
13 |
+
import pathlib
|
14 |
+
import gc
|
15 |
+
from huggingface_hub import hf_hub_download
|
16 |
+
import re
|
17 |
+
import urllib.parse
|
18 |
+
|
19 |
+
@spaces.GPU
|
20 |
+
def fake_gpu():
|
21 |
+
pass
|
22 |
+
|
23 |
+
def split_hf_url(url: str):
|
24 |
+
try:
|
25 |
+
s = list(re.findall(r'^(?:https?://huggingface.co/)(?:(datasets)/)?(.+?/.+?)/\w+?/.+?/(?:(.+)/)?(.+?.\w+)(?:\?download=true)?$', url)[0])
|
26 |
+
if len(s) < 4: return "", "", "", ""
|
27 |
+
repo_id = s[1]
|
28 |
+
repo_type = "dataset" if s[0] == "datasets" else "model"
|
29 |
+
subfolder = urllib.parse.unquote(s[2]) if s[2] else None
|
30 |
+
filename = urllib.parse.unquote(s[3])
|
31 |
+
return repo_id, filename, subfolder, repo_type
|
32 |
+
except Exception as e:
|
33 |
+
print(e)
|
34 |
+
|
35 |
+
def download_hf_file(directory, url):
|
36 |
+
repo_id, filename, subfolder, repo_type = split_hf_url(url)
|
37 |
+
try:
|
38 |
+
if subfolder is not None: hf_hub_download(repo_id=repo_id, filename=filename, subfolder=subfolder, repo_type=repo_type, local_dir=directory)
|
39 |
+
else: hf_hub_download(repo_id=repo_id, filename=filename, repo_type=repo_type, local_dir=directory)
|
40 |
+
print(f"Downloading: {url}")
|
41 |
+
return True
|
42 |
+
except Exception as e:
|
43 |
+
print(f"Failed to download: {e}")
|
44 |
+
return False
|
45 |
+
|
46 |
+
def Gitclone(URI:str,ClonePath:str = "",HASH:str = "") -> int :
|
47 |
+
if(ClonePath == "") :
|
48 |
+
while True:
|
49 |
+
try:
|
50 |
+
user_home =pathlib.Path.home().resolve()
|
51 |
+
os.chdir(str(user_home))
|
52 |
+
except Exception:
|
53 |
+
pass
|
54 |
+
i=subprocess.run([r"git",r"clone",URI])
|
55 |
+
try:
|
56 |
+
if HASH: os.system(f"git reset --hard {HASH}")
|
57 |
+
except Exception:
|
58 |
+
pass
|
59 |
+
if(i.returncode == 0 ):
|
60 |
+
del i
|
61 |
+
gc.collect()
|
62 |
+
return 0
|
63 |
+
else :
|
64 |
+
del i
|
65 |
+
else:
|
66 |
+
while True:
|
67 |
+
i=subprocess.run([r"git",r"clone",URI,ClonePath])
|
68 |
+
try:
|
69 |
+
os.chdir(ClonePath)
|
70 |
+
if HASH: os.system(f"git reset --hard {HASH}")
|
71 |
+
user_home =pathlib.Path.home().resolve()
|
72 |
+
os.chdir(str(user_home))
|
73 |
+
except Exception:
|
74 |
+
pass
|
75 |
+
if(i.returncode == 0 ):
|
76 |
+
del i
|
77 |
+
gc.collect()
|
78 |
+
return 0
|
79 |
+
else :
|
80 |
+
del i
|
81 |
+
def DownLoad(URI:str,DownloadPath:str,DownLoadFileName:str ) -> int:
|
82 |
+
while (True):
|
83 |
+
if "huggingface.co" in URI:
|
84 |
+
success=download_hf_file(DownloadPath, URI)
|
85 |
+
if success: return 0
|
86 |
+
else:
|
87 |
+
i=subprocess.run([r"aria2c",r"-c",r"-x" ,r"16", r"-s",r"16", r"-k" ,r"1M" ,r"-m",r"0",r"--enable-mmap=false",r"--console-log-level=error",r"-d",DownloadPath,r"-o",DownLoadFileName,URI]);
|
88 |
+
if(i.returncode == 0 ):
|
89 |
+
del i
|
90 |
+
gc.collect()
|
91 |
+
return 0
|
92 |
+
else :
|
93 |
+
del i
|
94 |
+
user_home =pathlib.Path.home().resolve()
|
95 |
+
os.chdir(str(user_home))
|
96 |
+
#clone stable-diffusion-webui repo
|
97 |
+
print("cloning stable-diffusion-webui repo")
|
98 |
+
Gitclone(r"https://github.com/AUTOMATIC1111/stable-diffusion-webui.git",str(user_home / r"stable-diffusion-webui"))
|
99 |
+
#os.chdir(str(user_home / r"stable-diffusion-webui"))
|
100 |
+
#os.system("git reset --hard 89f9faa63388756314e8a1d96cf86bf5e0663045")
|
101 |
+
#
|
102 |
+
|
103 |
+
#install extensions
|
104 |
+
print("installing extensions")
|
105 |
+
Gitclone(r"https://huggingface.co/embed/negative",str(user_home / r"stable-diffusion-webui" / r"embeddings" / r"negative"))
|
106 |
+
Gitclone(r"https://huggingface.co/embed/lora",str(user_home / r"stable-diffusion-webui" / r"models" / r"Lora" / r"positive"))
|
107 |
+
DownLoad(r"https://huggingface.co/embed/upscale/resolve/main/4x-UltraSharp.pth",str(user_home / r"stable-diffusion-webui" / r"models" / r"ESRGAN") ,r"4x-UltraSharp.pth")
|
108 |
+
while True:
|
109 |
+
if(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")]).returncode == 0):
|
110 |
+
break
|
111 |
+
#Gitclone(r"https://github.com/deforum-art/deforum-for-automatic1111-webui",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"deforum-for-automatic1111-webui" ))
|
112 |
+
#Gitclone(r"https://github.com/BlafKing/sd-civitai-browser-plus",str(user_home / r"stable-diffusion-webui" / r"extensions"/ r"sd-civitai-browser-plus"))
|
113 |
+
Gitclone(r"https://github.com/camenduru/stable-diffusion-webui-huggingface",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"stable-diffusion-webui-huggingface"))
|
114 |
+
#Gitclone(r"https://github.com/bbc-mc/sdweb-merge-board",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"sdweb-merge-board"))
|
115 |
+
Gitclone(r"https://github.com/etherealxx/batchlinks-webui",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"batchlinks-webui"))
|
116 |
+
Gitclone(r"https://github.com/kohya-ss/sd-webui-additional-networks",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-additional-networks"))
|
117 |
+
Gitclone(r"https://github.com/Akegarasu/sd-webui-model-converter",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-model-converter"))
|
118 |
+
#Gitclone(r"https://github.com/hako-mikan/sd-webui-supermerger",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-supermerger"))
|
119 |
+
Gitclone(r"https://github.com/tmzint/sd-webui-supermerger",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-supermerger"))
|
120 |
+
Gitclone(r"https://github.com/bbc-mc/sdweb-merge-block-weighted-gui",str(user_home / r"stable-diffusion-webui" / r"extensions"/ r"sdweb-merge-block-weighted-gui"))
|
121 |
+
|
122 |
+
#Gitclone(r"https://github.com/Mikubill/sd-webui-controlnet",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-controlnet"))
|
123 |
+
#Gitclone(r"https://github.com/fkunn1326/openpose-editor",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"openpose-editor"))
|
124 |
+
Gitclone(r"https://github.com/jexom/sd-webui-depth-lib",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-depth-lib"))
|
125 |
+
Gitclone(r"https://github.com/hnmr293/posex",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"posex"))
|
126 |
+
#Gitclone(r"https://github.com/nonnonstop/sd-webui-3d-open-pose-editor",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-3d-open-pose-editor"))
|
127 |
+
#中文本地化的请解除下一行的注释
|
128 |
+
#Gitclone(r"https://github.com/dtlnor/stable-diffusion-webui-localization-zh_CN.git",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"stable-diffusion-webui-localization-zh_CN"))
|
129 |
+
#Gitclone(r"https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git" , str(user_home / r"stable-diffusion-webui" / r"extensions" / r"a1111-sd-webui-tagcomplete"))
|
130 |
+
Gitclone(r"https://github.com/camenduru/sd-webui-tunnels",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-tunnels"))
|
131 |
+
#Gitclone(r"https://github.com/etherealxx/batchlinks-webui",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"batchlinks-webui"))
|
132 |
+
Gitclone(r"https://github.com/catppuccin/stable-diffusion-webui",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"stable-diffusion-webui-catppuccin"))
|
133 |
+
|
134 |
+
#Gitclone(r"https://github.com/KohakuBueleaf/a1111-sd-webui-locon",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"a1111-sd-webui-locon" ))
|
135 |
+
#Gitclone(r"https://github.com/AUTOMATIC1111/stable-diffusion-webui-rembg",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"stable-diffusion-webui-rembg"))
|
136 |
+
#Gitclone(r"https://github.com/ashen-sensored/stable-diffusion-webui-two-shot",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"stable-diffusion-webui-two-shot"))
|
137 |
+
#Gitclone(r"https://github.com/camenduru/sd_webui_stealth_pnginfo",str(user_home / r"stable-diffusion-webui" / r"extensions" / r"sd_webui_stealth_pnginfo"))
|
138 |
+
|
139 |
+
os.chdir(user_home / r"stable-diffusion-webui")
|
140 |
+
|
141 |
+
#download ControlNet models
|
142 |
+
print("extensions dolwnload done .\ndownloading ControlNet models")
|
143 |
+
dList =[r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_ip2p_fp16.safetensors",
|
144 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_shuffle_fp16.safetensors",
|
145 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_canny_fp16.safetensors",
|
146 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11f1p_sd15_depth_fp16.safetensors",
|
147 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_inpaint_fp16.safetensors",
|
148 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_lineart_fp16.safetensors",
|
149 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_mlsd_fp16.safetensors",
|
150 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_normalbae_fp16.safetensors",
|
151 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_openpose_fp16.safetensors",
|
152 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_scribble_fp16.safetensors",
|
153 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_seg_fp16.safetensors",
|
154 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_softedge_fp16.safetensors",
|
155 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15s2_lineart_anime_fp16.safetensors",
|
156 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11f1e_sd15_tile_fp16.safetensors",
|
157 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11e_sd15_ip2p_fp16.yaml",
|
158 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11e_sd15_shuffle_fp16.yaml",
|
159 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_canny_fp16.yaml",
|
160 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11f1p_sd15_depth_fp16.yaml",
|
161 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_inpaint_fp16.yaml",
|
162 |
+
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/raw/main/control_v11p_sd15_mlsd_fp16.yaml",
|
164 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_normalbae_fp16.yaml",
|
165 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_openpose_fp16.yaml",
|
166 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_scribble_fp16.yaml",
|
167 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_seg_fp16.yaml",
|
168 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_softedge_fp16.yaml",
|
169 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15s2_lineart_anime_fp16.yaml",
|
170 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11f1e_sd15_tile_fp16.yaml",
|
171 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_style_sd14v1.pth",
|
172 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_sketch_sd14v1.pth",
|
173 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_seg_sd14v1.pth",
|
174 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_openpose_sd14v1.pth",
|
175 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_keypose_sd14v1.pth",
|
176 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_depth_sd14v1.pth",
|
177 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_canny_sd14v1.pth",
|
178 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_canny_sd15v2.pth",
|
179 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_depth_sd15v2.pth",
|
180 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_sketch_sd15v2.pth",
|
181 |
+
r"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_zoedepth_sd15v1.pth"]
|
182 |
+
for i in range(0,len(dList)): DownLoad(dList[i],str(user_home / "stable-diffusion-webui" / "extensions" / "sd-webui-controlnet" / "models"),pathlib.Path(dList[i]).name)
|
183 |
+
del dList
|
184 |
+
|
185 |
+
#download model
|
186 |
+
#you can change model download address here
|
187 |
+
print("ControlNet models download done.\ndownloading model")
|
188 |
+
|
189 |
+
DownLoad(r"https://huggingface.co/Yntec/DucHaitenClassicAnime768/resolve/main/duchaitenclassicanimv10VAE.safetensors",str(user_home / r"stable-diffusion-webui" / r"models" / r"Stable-diffusion"),r"duchaitenclassicanimv10VAE.safetensors")
|
190 |
+
DownLoad(r"https://huggingface.co/DucHaiten/DucHaitenAIart/resolve/main/DucHaitenAIart-v4.5.3.safetensors",str(user_home / r"stable-diffusion-webui" / r"models" / r"Stable-diffusion"),r"DucHaitenAIart-v4.5.3.safetensors")
|
191 |
+
DownLoad(r"https://huggingface.co/DucHaiten/DucHaitenDreamWorld/resolve/main/DucHaitenDreamWorld_v3.0.safetensors",str(user_home / r"stable-diffusion-webui" / r"models" / r"Stable-diffusion"),r"DucHaitenDreamWorld_v3.0.safetensors")
|
192 |
+
DownLoad(r"https://huggingface.co/DucHaiten/DucHaitenJourney/resolve/main/DucHaiten-Journey_v5.6.7.2.3.safetensors",str(user_home / r"stable-diffusion-webui" / r"models" / r"Stable-diffusion"),r"DucHaiten-Journey_v5.6.7.2.3.safetensors")
|
193 |
+
DownLoad(r"https://huggingface.co/DucHaiten/DucHaiten-StyleLikeMe/resolve/main/DucHaiten-StyleLikeMe_v1.5-fp16-no-ema.safetensors",str(user_home / r"stable-diffusion-webui" / r"models" / r"Stable-diffusion"),r"DucHaiten-StyleLikeMe_v1.5-fp16-no-ema.safetensors")
|
194 |
+
DownLoad(r"https://huggingface.co/DucHaiten/DucHaitenSuperCute/resolve/main/DucHaitenSuperCute_v2.0.safetensors",str(user_home / r"stable-diffusion-webui" / r"models" / r"Stable-diffusion"),r"DucHaitenSuperCute_v2.0.safetensors")
|
195 |
+
DownLoad(r"https://huggingface.co/Yntec/DucHaitenAnime768/resolve/main/DucHaitenAnimefp16noema.safetensors",str(user_home / r"stable-diffusion-webui" / r"models" / r"Stable-diffusion"),r"DucHaitenAnimefp16noema.safetensors")
|
196 |
+
|
197 |
+
#start webui
|
198 |
+
|
199 |
+
print("Done\nStarting Webui...")
|
200 |
+
os.chdir(user_home / r"stable-diffusion-webui")
|
201 |
+
while True:
|
202 |
+
ret=subprocess.run([r"python3" ,r"launch.py",r"--precision",r"full",r"--no-half",r"--no-half-vae",r"--enable-insecure-extension-access",r"--medvram",r"--skip-torch-cuda-test",r"--enable-console-prompts",r"--ui-settings-file="+str(pathlib.Path(__file__).parent /r"config.json")])
|
203 |
+
if(ret.returncode == 0 ):
|
204 |
+
del ret
|
205 |
+
gc.collect()
|
206 |
+
else :
|
207 |
+
del ret
|
208 |
+
|
209 |
del os ,user_home ,pyexecutable ,subprocess
|
packages.txt
CHANGED
@@ -1,2 +1 @@
|
|
1 |
-
aria2
|
2 |
-
wget
|
|
|
1 |
+
aria2 wget
|
|
pre-requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
pip>=24.1
|
requirements.txt
CHANGED
@@ -1,38 +1,39 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
|
1 |
+
spaces
|
2 |
+
torch
|
3 |
+
torchvision>=0.16.0
|
4 |
+
torchaudio
|
5 |
+
torchtext
|
6 |
+
torchdata
|
7 |
+
astunparse
|
8 |
+
blendmodes
|
9 |
+
accelerate
|
10 |
+
git+https://github.com/XPixelGroup/BasicSR
|
11 |
+
git+https://github.com/TencentARC/GFPGAN
|
12 |
+
fonts
|
13 |
+
font-roboto
|
14 |
+
gradio==3.29.0
|
15 |
+
numpy
|
16 |
+
omegaconf
|
17 |
+
opencv-contrib-python
|
18 |
+
requests
|
19 |
+
piexif
|
20 |
+
Pillow
|
21 |
+
pytorch_lightning>=1.7.7
|
22 |
+
realesrgan
|
23 |
+
scikit-image>=0.19
|
24 |
+
timm>=0.4.12
|
25 |
+
transformers>=4.25.1
|
26 |
+
einops
|
27 |
+
jsonmerge
|
28 |
+
clean-fid
|
29 |
+
resize-right
|
30 |
+
torchdiffeq
|
31 |
+
kornia
|
32 |
+
lark
|
33 |
+
inflection
|
34 |
+
GitPython
|
35 |
+
git+https://github.com/google-research/torchsde
|
36 |
+
safetensors
|
37 |
+
psutil
|
38 |
+
rich
|
39 |
+
httpx>=0.24.1
|