greendra commited on
Commit
c03db8e
1 Parent(s): 5dcf0f5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -153,7 +153,7 @@ def sd(prompt, negprompt, version):
153
 
154
  if version == "2.1":
155
  engine = "stable-diffusion-512-v2-1"
156
- if version == "1.5":
157
  engine = "stable-diffusion-xl-1024-v1-0"
158
 
159
  # connect to dream API
@@ -242,20 +242,20 @@ def sd(prompt, negprompt, version):
242
 
243
 
244
  examples = [["A hyperrealistic photograph of German architectural modern home in the suburbs of Hamburg, Germany, lens flares, cinematic, hdri, matte painting, concept art, celestial, soft render, highly detailed, cgsociety, octane render, trending on artstation, architectural HD, HQ, 4k, 8k", "tree, bush, woods, branches, leaves, green, forest", "2.1"],
245
- ["A dream of a distant galaxy, by Caspar David Friedrich, matte painting trending on artstation HQ", "", "1.5"],
246
  ["A Hyperrealistic photograph of ancient Malaysian architectural ruins in Borneo's East Malaysia, lens flares, cinematic, hdri, matte painting, concept art, celestial, soft render, highly detailed, cgsociety, octane render, trending on artstation, architectural HD, HQ, 4k, 8k", "", "2.1"],
247
- ["A small cabin on top of a snowy mountain in the style of Disney, artstation", "", "1.5"],
248
  ["A Hyperrealistic photograph of ancient Tokyo/London/Paris architectural ruins in a flooded apocalypse landscape of dead skyscrapers, lens flares, cinematic, hdri, matte painting, concept art, celestial, soft render, highly detailed, cgsociety, octane render, trending on artstation, architectural HD, HQ, 4k, 8k", "", "2.1"],
249
  ["a portrait of a beautiful blonde woman, fine - art photography, soft portrait shot 8 k, mid length, ultrarealistic uhd faces, unsplash, kodak ultra max 800, 85 mm, intricate, casual pose, centered symmetrical composition, stunning photos, masterpiece, grainy, centered composition", "blender, cropped, lowres, poorly drawn face, out of frame, poorly drawn hands, blurry, bad art, blurred, text, watermark, disfigured, deformed, closed eyes", "2.1"],
250
  ["A hyperrealistic painting of an astronaut inside of a massive futuristic metal mechawarehouse, cinematic, sci-fi, lens flares, rays of light, epic, matte painting, concept art, celestial, soft render, octane render, trending on artstation, 4k, 8k", "blender, cropped, lowres, out of frame, blurry, bad art, blurred, text, disfigured, deformed", "2.1"]]
251
 
252
  with gr.Blocks(
253
  ) as demo:
254
- # create radio for to use either v1.5 or v2.0
255
  version = gr.Radio(
256
  label="Stable Diffusion Version",
257
- choices=["1.5", "2.1"],
258
- value="1.5",
259
  elem_id="version",
260
  )
261
 
 
153
 
154
  if version == "2.1":
155
  engine = "stable-diffusion-512-v2-1"
156
+ if version == "XL":
157
  engine = "stable-diffusion-xl-1024-v1-0"
158
 
159
  # connect to dream API
 
242
 
243
 
244
  examples = [["A hyperrealistic photograph of German architectural modern home in the suburbs of Hamburg, Germany, lens flares, cinematic, hdri, matte painting, concept art, celestial, soft render, highly detailed, cgsociety, octane render, trending on artstation, architectural HD, HQ, 4k, 8k", "tree, bush, woods, branches, leaves, green, forest", "2.1"],
245
+ ["A dream of a distant galaxy, by Caspar David Friedrich, matte painting trending on artstation HQ", "", "XL"],
246
  ["A Hyperrealistic photograph of ancient Malaysian architectural ruins in Borneo's East Malaysia, lens flares, cinematic, hdri, matte painting, concept art, celestial, soft render, highly detailed, cgsociety, octane render, trending on artstation, architectural HD, HQ, 4k, 8k", "", "2.1"],
247
+ ["A small cabin on top of a snowy mountain in the style of Disney, artstation", "", "XL"],
248
  ["A Hyperrealistic photograph of ancient Tokyo/London/Paris architectural ruins in a flooded apocalypse landscape of dead skyscrapers, lens flares, cinematic, hdri, matte painting, concept art, celestial, soft render, highly detailed, cgsociety, octane render, trending on artstation, architectural HD, HQ, 4k, 8k", "", "2.1"],
249
  ["a portrait of a beautiful blonde woman, fine - art photography, soft portrait shot 8 k, mid length, ultrarealistic uhd faces, unsplash, kodak ultra max 800, 85 mm, intricate, casual pose, centered symmetrical composition, stunning photos, masterpiece, grainy, centered composition", "blender, cropped, lowres, poorly drawn face, out of frame, poorly drawn hands, blurry, bad art, blurred, text, watermark, disfigured, deformed, closed eyes", "2.1"],
250
  ["A hyperrealistic painting of an astronaut inside of a massive futuristic metal mechawarehouse, cinematic, sci-fi, lens flares, rays of light, epic, matte painting, concept art, celestial, soft render, octane render, trending on artstation, 4k, 8k", "blender, cropped, lowres, out of frame, blurry, bad art, blurred, text, disfigured, deformed", "2.1"]]
251
 
252
  with gr.Blocks(
253
  ) as demo:
254
+ # create radio for to use either XL or v2.0
255
  version = gr.Radio(
256
  label="Stable Diffusion Version",
257
+ choices=["XL", "2.1"],
258
+ value="XL",
259
  elem_id="version",
260
  )
261