Warlord-K commited on
Commit
5dab465
1 Parent(s): d49a403
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -87,6 +87,8 @@ DEFAULT_STYLE_NAME = "Cinematic"
87
 
88
  def apply_style(style_name: str, positive: str, negative: str = "") -> Tuple[str, str]:
89
  p, n = styles.get(style_name, styles[DEFAULT_STYLE_NAME])
 
 
90
  return p.replace("{prompt}", positive), n + negative
91
 
92
 
@@ -163,7 +165,7 @@ def generate(
163
  prompt_2 = None # type: ignore
164
  if not use_negative_prompt_2:
165
  negative_prompt_2 = None # type: ignore
166
- prompt, negative_prompt = apply_refiner(style, prompt, negative_prompt)
167
  if not apply_refiner:
168
  image = pipe(
169
  prompt=prompt,
 
87
 
88
  def apply_style(style_name: str, positive: str, negative: str = "") -> Tuple[str, str]:
89
  p, n = styles.get(style_name, styles[DEFAULT_STYLE_NAME])
90
+ if not negative:
91
+ negative = ""
92
  return p.replace("{prompt}", positive), n + negative
93
 
94
 
 
165
  prompt_2 = None # type: ignore
166
  if not use_negative_prompt_2:
167
  negative_prompt_2 = None # type: ignore
168
+ prompt, negative_prompt = apply_style(style, prompt, negative_prompt)
169
  if not apply_refiner:
170
  image = pipe(
171
  prompt=prompt,