Spaces:
Running
Running
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -90,7 +90,7 @@ def generate_random_string(length):
|
|
90 |
@spaces.GPU(duration=40)
|
91 |
def Piper1(pipe,_do):
|
92 |
try:
|
93 |
-
retu =
|
94 |
_do,
|
95 |
height=512,
|
96 |
width=512,
|
@@ -106,7 +106,7 @@ def Piper1(pipe,_do):
|
|
106 |
@spaces.GPU(duration=40)
|
107 |
def Piper2(pipe,img,posi,neg):
|
108 |
try:
|
109 |
-
retu =
|
110 |
prompt=posi,
|
111 |
negative_prompt=neg,
|
112 |
image=img
|
@@ -174,7 +174,7 @@ def infer(p):
|
|
174 |
neg = _dont
|
175 |
else:
|
176 |
neg = None
|
177 |
-
output = Piper1(
|
178 |
if output == None:
|
179 |
return None
|
180 |
else:
|
@@ -182,7 +182,7 @@ def infer(p):
|
|
182 |
if neg == None:
|
183 |
return name
|
184 |
img = load_image(name).convert("RGB")
|
185 |
-
output2 = Piper2(
|
186 |
if output2 == None:
|
187 |
return None
|
188 |
else:
|
@@ -242,7 +242,7 @@ if __name__ == "__main__":
|
|
242 |
pp2=pipe_i2i()
|
243 |
result=[]
|
244 |
|
245 |
-
mp.set_start_method("fork", force=True)
|
246 |
|
247 |
port_inc()
|
248 |
ui()
|
|
|
90 |
@spaces.GPU(duration=40)
|
91 |
def Piper1(pipe,_do):
|
92 |
try:
|
93 |
+
retu = pp1(
|
94 |
_do,
|
95 |
height=512,
|
96 |
width=512,
|
|
|
106 |
@spaces.GPU(duration=40)
|
107 |
def Piper2(pipe,img,posi,neg):
|
108 |
try:
|
109 |
+
retu = pp2(
|
110 |
prompt=posi,
|
111 |
negative_prompt=neg,
|
112 |
image=img
|
|
|
174 |
neg = _dont
|
175 |
else:
|
176 |
neg = None
|
177 |
+
output = Piper1('A '+" ".join(_do))
|
178 |
if output == None:
|
179 |
return None
|
180 |
else:
|
|
|
182 |
if neg == None:
|
183 |
return name
|
184 |
img = load_image(name).convert("RGB")
|
185 |
+
output2 = Piper2(img,p1,neg)
|
186 |
if output2 == None:
|
187 |
return None
|
188 |
else:
|
|
|
242 |
pp2=pipe_i2i()
|
243 |
result=[]
|
244 |
|
245 |
+
#mp.set_start_method("fork", force=True)
|
246 |
|
247 |
port_inc()
|
248 |
ui()
|