Garrett Goon commited on
Commit
55b5748
·
1 Parent(s): 470da86

new examples and det-logo req

Browse files
Files changed (1) hide show
  1. app.py +5 -10
app.py CHANGED
@@ -60,6 +60,8 @@ def replace_concept_tokens(text: str):
60
  return text
61
 
62
  def inference(prompt: str, guidance_scale: int, num_inference_steps: int, seed: int):
 
 
63
  prompt = replace_concept_tokens(prompt)
64
  generator = torch.Generator(device=device).manual_seed(seed)
65
  output = pipeline(
@@ -224,14 +226,7 @@ examples = [
224
  # 1024,
225
  ],
226
  [
227
- "a simple and atmospheric watercolour <det-logo>, very muted colors, by rebecca guay, michael kaluta, charles vess and jean moebius giraud",
228
- # 4,
229
- # 45,
230
- # 7,
231
- # 1024,
232
- ],
233
- [
234
- "a dark Rembrant painting of a <det-logo>, incredible composition, masterpiece",
235
  # 4,
236
  # 45,
237
  # 7,
@@ -284,7 +279,7 @@ with block:
284
 
285
  with gr.Row(elem_id="advanced-options"):
286
  num_inference_steps = gr.Slider(
287
- label="Steps", minimum=1, maximum=80, value=40, step=1
288
  )
289
  guidance_scale = gr.Slider(
290
  label="Guidance Scale", minimum=1.0, maximum=25.0, value=7.5, step=0.1
@@ -345,4 +340,4 @@ Despite how impressive being able to turn text into image is, beware to the fact
345
  """
346
  )
347
 
348
- block.queue(max_size=10).launch(enable_queue=True)
 
60
  return text
61
 
62
  def inference(prompt: str, guidance_scale: int, num_inference_steps: int, seed: int):
63
+ if '<det-logo>' not in prompt:
64
+ raise ValueError('"<det-logo>" must be included in the prompt.')
65
  prompt = replace_concept_tokens(prompt)
66
  generator = torch.Generator(device=device).manual_seed(seed)
67
  output = pipeline(
 
226
  # 1024,
227
  ],
228
  [
229
+ " Beautiful tarot illustration of a <det-logo>, in the style of james jean and victo ngai, mystical colors, trending on artstation",
 
 
 
 
 
 
 
230
  # 4,
231
  # 45,
232
  # 7,
 
279
 
280
  with gr.Row(elem_id="advanced-options"):
281
  num_inference_steps = gr.Slider(
282
+ label="Steps", minimum=1, maximum=80, value=50, step=1
283
  )
284
  guidance_scale = gr.Slider(
285
  label="Guidance Scale", minimum=1.0, maximum=25.0, value=7.5, step=0.1
 
340
  """
341
  )
342
 
343
+ block.queue(max_size=10).launch(show_error=True)