Spaces:
Runtime error
Runtime error
r0seyyyd33p
commited on
Commit
•
05f3c3a
1
Parent(s):
8098a2c
Upload 2 files
Browse files- app.py +10 -11
- requirements.txt +1 -0
app.py
CHANGED
@@ -16,10 +16,10 @@ def Gitclone(URI:str,ClonePath:pathlib.Path ) -> int :
|
|
16 |
for z in range(10):
|
17 |
i=subprocess.run([r"git",r"clone",str(URI),str(ClonePath)])
|
18 |
if(i.returncode == 0 ):
|
19 |
-
|
20 |
-
|
21 |
else :
|
22 |
-
|
23 |
raise Exception(str.format("clone \'{0}\' failed",URI))
|
24 |
|
25 |
|
@@ -40,20 +40,19 @@ os.chdir(str(user_home))
|
|
40 |
#clone stable-diffusion-webui repo
|
41 |
print("cloning stable-diffusion-webui repo")
|
42 |
Gitclone(r"https://github.com/AUTOMATIC1111/stable-diffusion-webui.git",user_home / r"stable-diffusion-webui")
|
43 |
-
subprocess.run([r"pip", r"install", r"-U", r"pip", r"&&", r"pip", r"install", r"-U", r"httpcore==0.24.1"])
|
44 |
os.chdir(str(user_home / r"stable-diffusion-webui"))
|
45 |
os.system("git reset --hard "+commit_id)
|
46 |
#install extensions
|
47 |
print("installing extensions")
|
48 |
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")
|
49 |
while (True):
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
|
58 |
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")
|
59 |
Gitclone(r"https://github.com/kohya-ss/sd-webui-additional-networks",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-additional-networks")
|
|
|
16 |
for z in range(10):
|
17 |
i=subprocess.run([r"git",r"clone",str(URI),str(ClonePath)])
|
18 |
if(i.returncode == 0 ):
|
19 |
+
del i
|
20 |
+
return 0
|
21 |
else :
|
22 |
+
del i
|
23 |
raise Exception(str.format("clone \'{0}\' failed",URI))
|
24 |
|
25 |
|
|
|
40 |
#clone stable-diffusion-webui repo
|
41 |
print("cloning stable-diffusion-webui repo")
|
42 |
Gitclone(r"https://github.com/AUTOMATIC1111/stable-diffusion-webui.git",user_home / r"stable-diffusion-webui")
|
|
|
43 |
os.chdir(str(user_home / r"stable-diffusion-webui"))
|
44 |
os.system("git reset --hard "+commit_id)
|
45 |
#install extensions
|
46 |
print("installing extensions")
|
47 |
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")
|
48 |
while (True):
|
49 |
+
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")])
|
50 |
+
if(i.returncode == 0 ):
|
51 |
+
del i
|
52 |
+
gc.collect()
|
53 |
+
break
|
54 |
+
else :
|
55 |
+
del i
|
56 |
|
57 |
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")
|
58 |
Gitclone(r"https://github.com/kohya-ss/sd-webui-additional-networks",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-additional-networks")
|
requirements.txt
CHANGED
@@ -16,6 +16,7 @@ lark
|
|
16 |
numpy
|
17 |
omegaconf
|
18 |
open-clip-torch
|
|
|
19 |
|
20 |
piexif
|
21 |
psutil
|
|
|
16 |
numpy
|
17 |
omegaconf
|
18 |
open-clip-torch
|
19 |
+
httpcore==0.24.1
|
20 |
|
21 |
piexif
|
22 |
psutil
|