Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -82,11 +82,11 @@ def Piper(_do):
|
|
82 |
try:
|
83 |
retu = pipe(
|
84 |
_do,
|
85 |
-
height=
|
86 |
-
width=
|
87 |
-
num_inference_steps=
|
88 |
max_sequence_length=256,
|
89 |
-
guidance_scale=
|
90 |
)
|
91 |
return retu
|
92 |
except:
|
@@ -96,9 +96,9 @@ def infer(p1,p2):
|
|
96 |
name = generate_random_string(12)+".png"
|
97 |
_do = ['beautiful', 'playful', 'photographed', 'highly detailed', 'realistic elements', 'dynamic poze', 'deep field', 'vivid reasonable coloring', 'rough texture', 'high sharpness', 'highres', 'best quality', 'focused']
|
98 |
if p1 != "":
|
99 |
-
_do.append(f'{p1}')
|
100 |
if p2 != "":
|
101 |
-
_do.append(f'hiding
|
102 |
output = Piper('A '+" ".join(_do))
|
103 |
if output == "":
|
104 |
return output
|
|
|
82 |
try:
|
83 |
retu = pipe(
|
84 |
_do,
|
85 |
+
height=512,
|
86 |
+
width=512,
|
87 |
+
num_inference_steps=40,
|
88 |
max_sequence_length=256,
|
89 |
+
guidance_scale=8
|
90 |
)
|
91 |
return retu
|
92 |
except:
|
|
|
96 |
name = generate_random_string(12)+".png"
|
97 |
_do = ['beautiful', 'playful', 'photographed', 'highly detailed', 'realistic elements', 'dynamic poze', 'deep field', 'vivid reasonable coloring', 'rough texture', 'high sharpness', 'highres', 'best quality', 'focused']
|
98 |
if p1 != "":
|
99 |
+
_do.append(f'showing {p1 }clearly')
|
100 |
if p2 != "":
|
101 |
+
_do.append(f'hiding {p2} perfectly')
|
102 |
output = Piper('A '+" ".join(_do))
|
103 |
if output == "":
|
104 |
return output
|