Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -78,8 +78,8 @@ def Piper(_do,_dont):
|
|
78 |
height=512,
|
79 |
width=768,
|
80 |
negative_prompt=_dont,
|
81 |
-
num_inference_steps=
|
82 |
-
guidance_scale=9
|
83 |
)
|
84 |
|
85 |
def infer(prompt,prompt2):
|
@@ -87,13 +87,13 @@ def infer(prompt,prompt2):
|
|
87 |
prompt_en = translate(prompt,"english")
|
88 |
prompt2_en = translate(prompt2,"english")
|
89 |
if prompt == None or prompt.strip() == "":
|
90 |
-
_do = 'natural colors, rough texture,
|
91 |
else:
|
92 |
-
_do = f'{ prompt_en }, natural colors, rough texture,
|
93 |
if prompt2 == None or prompt2.strip() == "":
|
94 |
-
_dont = 'ugly, deformed,
|
95 |
else:
|
96 |
-
_dont = f'ugly, deformed,
|
97 |
image = Piper(_do,_dont).images[0].save(name)
|
98 |
return name
|
99 |
|
|
|
78 |
height=512,
|
79 |
width=768,
|
80 |
negative_prompt=_dont,
|
81 |
+
num_inference_steps=400,
|
82 |
+
guidance_scale=9.5
|
83 |
)
|
84 |
|
85 |
def infer(prompt,prompt2):
|
|
|
87 |
prompt_en = translate(prompt,"english")
|
88 |
prompt2_en = translate(prompt2,"english")
|
89 |
if prompt == None or prompt.strip() == "":
|
90 |
+
_do = 'natural colors, rough texture, proportional content, dynamic poze, realistic details, award winning photograph, soft natural lighting, deep field, high definition, highly detailed, 8k'
|
91 |
else:
|
92 |
+
_do = f'{ prompt_en }, natural colors, rough texture, proportional content, dynamic poze, realistic details, award winning photograph, soft natural lighting, deep field, high definition, highly detailed, 8k'
|
93 |
if prompt2 == None or prompt2.strip() == "":
|
94 |
+
_dont = 'ugly, deformed, inflated, disfigured, poor details, bad anatomy, labels, texts, logos'
|
95 |
else:
|
96 |
+
_dont = f'ugly, deformed, inflated, disfigured, poor details, bad anatomy, {prompt2_en} where in {prompt_en}, logo where in {prompt_en}, text where in {prompt_en}, labels where in {prompt_en}, {prompt2_en}, labels'
|
97 |
image = Piper(_do,_dont).images[0].save(name)
|
98 |
return name
|
99 |
|