Yaron Koresh commited on
Commit
3563b27
·
verified ·
1 Parent(s): 1b7a5fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -85,14 +85,14 @@ def generate_random_string(length):
85
  characters = string.ascii_letters + string.digits
86
  return ''.join(random.choice(characters) for _ in range(length))
87
 
88
- @spaces.GPU(duration=120)
89
  def Piper(_do,_dont):
90
  return pipe(
91
  _do,
92
  height=512,
93
  width=576,
94
  negative_prompt=_dont,
95
- num_inference_steps=400,
96
  guidance_scale=10
97
  )
98
 
@@ -101,9 +101,9 @@ def infer(prompt,prompt2):
101
  prompt_en = translate(prompt,"english")
102
  prompt2_en = translate(prompt2,"english")
103
  if prompt == None or prompt.strip() == "":
104
- _do = 'natural dark vivid colors, rough texture, dynamic poze, proportional, reasonable, realistic, soft lighting, deep field, highly detailed, blurred bright background'
105
  else:
106
- _do = f'amazing { prompt_en } photograph, natural dark vivid colors, rough texture, dynamic poze, proportional, reasonable, realistic, soft lighting, deep field, highly detailed, blurred bright background'
107
  if prompt2 == None or prompt2.strip() == "":
108
  _dont = 'ugly, deformed, disfigured, poor details, bad anatomy, logos, texts, labels'
109
  else:
 
85
  characters = string.ascii_letters + string.digits
86
  return ''.join(random.choice(characters) for _ in range(length))
87
 
88
+ @spaces.GPU(duration=35)
89
  def Piper(_do,_dont):
90
  return pipe(
91
  _do,
92
  height=512,
93
  width=576,
94
  negative_prompt=_dont,
95
+ num_inference_steps=125,
96
  guidance_scale=10
97
  )
98
 
 
101
  prompt_en = translate(prompt,"english")
102
  prompt2_en = translate(prompt2,"english")
103
  if prompt == None or prompt.strip() == "":
104
+ _do = 'sharp warm dark vivid vintage foreground, rough texture, dynamic poze, proportional, reasonable, realistic, blurred cold light muted pastel background'
105
  else:
106
+ _do = f'photographed { prompt_en }, sharp warm dark vivid vintage colors, rough texture, dynamic poze, proportional, reasonable, realistic, blurred cold light muted pastel background'
107
  if prompt2 == None or prompt2.strip() == "":
108
  _dont = 'ugly, deformed, disfigured, poor details, bad anatomy, logos, texts, labels'
109
  else: