Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -29,8 +29,10 @@ def chdr(apol,prompt,modil,stips,fnamo,gaul):
|
|
29 |
type="LDM3D"
|
30 |
los=""
|
31 |
tre='./tmpo/'+fnamo+'.json'
|
32 |
-
tra='./tmpo/'+fnamo+'
|
33 |
-
trm='./tmpo/'+fnamo+'
|
|
|
|
|
34 |
flng=["yssup", "sllab", "stsaerb", "sinep", "selppin", "ssa", "tnuc", "mub", "kcoc", "kcid", "anigav", "dekan", "edun", "slatineg", "xes", "nrop", "stit", "ttub", "bojwolb", "noitartenep", "kcuf", "kcus", "kcil", "elttil", "gnuoy", "thgit", "lrig", "etitep", "dlihc", "yxes"]
|
35 |
flng=[itm[::-1] for itm in flng]
|
36 |
ptn = r"\b" + r"\b|\b".join(flng) + r"\b"
|
@@ -53,6 +55,8 @@ def chdr(apol,prompt,modil,stips,fnamo,gaul):
|
|
53 |
del tre
|
54 |
del tra
|
55 |
del trm
|
|
|
|
|
56 |
except:
|
57 |
print("cant")
|
58 |
except:
|
@@ -78,10 +82,10 @@ def plex(prompt,neg_prompt,stips,nut,wit,het,gaul,progress=gr.Progress(track_tqd
|
|
78 |
image = pipe(prompt=[prompt]*2, negative_prompt=[neg_prompt]*2, generator=generator, guidance_scale=7.0, num_inference_steps=stips,height=het,width=wit)
|
79 |
for a, imze in enumerate(image["rgb"]):
|
80 |
apol.append(imze)
|
81 |
-
imze.save('./tmpo/'+fnamo+'
|
82 |
for b, imbe in enumerate(image["depth"]):
|
83 |
apol.append(imbe)
|
84 |
-
imbe.save('./tmpo/'+fnamo+'
|
85 |
chdr(apol,prompt,modil,stips,fnamo,gaul)
|
86 |
return apol
|
87 |
|
|
|
29 |
type="LDM3D"
|
30 |
los=""
|
31 |
tre='./tmpo/'+fnamo+'.json'
|
32 |
+
tra='./tmpo/'+fnamo+'_rgb_0.png'
|
33 |
+
trm='./tmpo/'+fnamo+'_rgb_1.png'
|
34 |
+
trh='./tmpo/'+fnamo+'_dep_0.png'
|
35 |
+
trv='./tmpo/'+fnamo+'_dep_1.png'
|
36 |
flng=["yssup", "sllab", "stsaerb", "sinep", "selppin", "ssa", "tnuc", "mub", "kcoc", "kcid", "anigav", "dekan", "edun", "slatineg", "xes", "nrop", "stit", "ttub", "bojwolb", "noitartenep", "kcuf", "kcus", "kcil", "elttil", "gnuoy", "thgit", "lrig", "etitep", "dlihc", "yxes"]
|
37 |
flng=[itm[::-1] for itm in flng]
|
38 |
ptn = r"\b" + r"\b|\b".join(flng) + r"\b"
|
|
|
55 |
del tre
|
56 |
del tra
|
57 |
del trm
|
58 |
+
del trh
|
59 |
+
del trv
|
60 |
except:
|
61 |
print("cant")
|
62 |
except:
|
|
|
82 |
image = pipe(prompt=[prompt]*2, negative_prompt=[neg_prompt]*2, generator=generator, guidance_scale=7.0, num_inference_steps=stips,height=het,width=wit)
|
83 |
for a, imze in enumerate(image["rgb"]):
|
84 |
apol.append(imze)
|
85 |
+
imze.save('./tmpo/'+fnamo+'_rgb_'+str(a)+'.png', 'PNG')
|
86 |
for b, imbe in enumerate(image["depth"]):
|
87 |
apol.append(imbe)
|
88 |
+
imbe.save('./tmpo/'+fnamo+'_dep_'+str(b)+'.png', 'PNG')
|
89 |
chdr(apol,prompt,modil,stips,fnamo,gaul)
|
90 |
return apol
|
91 |
|