KingNish commited on
Commit
45b7208
1 Parent(s): 8b03161

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -48
app.py CHANGED
@@ -48,9 +48,9 @@ style_list = [
48
  "negative_prompt": "anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured",
49
  },
50
  {
51
- "name": "Photographic",
52
- "prompt": "cinematic photo {prompt} . 35mm photograph, film, bokeh, professional, 4k, highly detailed",
53
- "negative_prompt": "drawing, painting, crayon, sketch, graphite, impressionist, noisy, blurry, soft, deformed, ugly",
54
  },
55
  {
56
  "name": "Anime",
@@ -92,7 +92,7 @@ style_list = [
92
 
93
  styles = {k["name"]: (k["prompt"], k["negative_prompt"]) for k in style_list}
94
  STYLE_NAMES = list(styles.keys())
95
- DEFAULT_STYLE_NAME = "(No style)"
96
  SCHEDULE_NAME = ["DPM-Solver", "SA-Solver"]
97
  DEFAULT_SCHEDULE_NAME = "DPM-Solver"
98
  NUM_IMAGES_PER_PROMPT = 1
@@ -165,12 +165,12 @@ def generate(
165
  use_negative_prompt: bool = False,
166
  num_imgs: int = 1,
167
  seed: int = 0,
168
- width: int = 1024,
169
- height: int = 1024,
170
  schedule: str = 'DPM-Solver',
171
- dpms_guidance_scale: float = 4.5,
172
  sas_guidance_scale: float = 3,
173
- dpms_inference_steps: int = 20,
174
  sas_inference_steps: int = 25,
175
  randomize_seed: bool = False,
176
  use_resolution_binning: bool = True,
@@ -216,17 +216,17 @@ def generate(
216
 
217
 
218
  examples = [
219
- "A small cactus with a happy face in the Sahara desert.",
220
- "Eiffel Tower was Made up of more than 2 million translucent straws to look like a cloud, with the bell tower at the top of the building, Michel installed huge foam-making machines in the forest to blow huge amounts of unpredictable wet clouds in the building's classic architecture.",
221
- "3D animation of a small, round, fluffy creature with big, expressive eyes explores a vibrant, enchanted forest. The creature, a whimsical blend of a rabbit and a squirrel, has soft blue fur and a bushy, striped tail. It hops along a sparkling stream, its eyes wide with wonder. The forest is alive with magical elements: flowers that glow and change colors, trees with leaves in shades of purple and silver, and small floating lights that resemble fireflies. The creature stops to interact playfully with a group of tiny, fairy-like beings dancing around a mushroom ring. The creature looks up in awe at a large, glowing tree that seems to be the heart of the forest.",
222
  "Color photo of a corgi made of transparent glass, standing on the riverside in Yosemite National Park.",
223
- "A close-up photo of a person. The subject is a woman. She wore a blue coat with a gray dress underneath. She has blue eyes and blond hair, and wears a pair of earrings. Behind are blurred city buildings and streets.",
224
  "A litter of golden retriever puppies playing in the snow. Their heads pop out of the snow, covered in.",
225
  "a handsome young boy in the middle with sky color background wearing eye glasses, it's super detailed with anime style, it's a portrait with delicated eyes and nice looking face",
226
  "an astronaut sitting in a diner, eating fries, cinematic, analog film",
227
- "Pirate ship trapped in a cosmic maelstrom nebula, rendered in cosmic beach whirlpool engine, volumetric lighting, spectacular, ambient lights, light pollution, cinematic atmosphere, art nouveau style, illustration art artwork by SenseiJaye, intricate detail.",
228
  "professional portrait photo of an anthropomorphic cat wearing fancy gentleman hat and jacket walking in autumn forest.",
229
- "The parametric hotel lobby is a sleek and modern space with plenty of natural light. The lobby is spacious and open with a variety of seating options. The front desk is a sleek white counter with a parametric design. The walls are a light blue color with parametric patterns. The floor is a light wood color with a parametric design. There are plenty of plants and flowers throughout the space. The overall effect is a calm and relaxing space. occlusion, moody, sunset, concept art, octane rendering, 8k, highly detailed, concept art, highly detailed, beautiful scenery, cinematic, beautiful light, hyperreal, octane render, hdr, long exposure, 8K, realistic, fog, moody, fire and explosions, smoke, 50mm f2.8",
230
  ]
231
 
232
  with gr.Blocks(css="style.css") as demo:
@@ -252,16 +252,6 @@ with gr.Blocks(css="style.css") as demo:
252
  with gr.Group():
253
  with gr.Row():
254
  use_negative_prompt = gr.Checkbox(label="Use negative prompt", value=False, visible=True)
255
- with gr.Row(visible=True):
256
- schedule = gr.Radio(
257
- show_label=True,
258
- container=True,
259
- interactive=True,
260
- choices=SCHEDULE_NAME,
261
- value=DEFAULT_SCHEDULE_NAME,
262
- label="Sampler Schedule",
263
- visible=True,
264
- )
265
  num_imgs = gr.Slider(
266
  label="Num Images",
267
  minimum=1,
@@ -297,44 +287,29 @@ with gr.Blocks(css="style.css") as demo:
297
  minimum=256,
298
  maximum=MAX_IMAGE_SIZE,
299
  step=32,
300
- value=1024,
301
  )
302
  height = gr.Slider(
303
  label="Height",
304
  minimum=256,
305
  maximum=MAX_IMAGE_SIZE,
306
  step=32,
307
- value=1024,
308
  )
309
  with gr.Row():
310
  dpms_guidance_scale = gr.Slider(
311
- label="DPM-Solver Guidance scale",
312
- minimum=1,
313
- maximum=10,
314
  step=0.1,
315
- value=4.5,
316
  )
317
  dpms_inference_steps = gr.Slider(
318
- label="DPM-Solver inference steps",
319
  minimum=5,
320
- maximum=40,
321
- step=1,
322
- value=14,
323
- )
324
- with gr.Row():
325
- sas_guidance_scale = gr.Slider(
326
- label="SA-Solver Guidance scale",
327
- minimum=1,
328
- maximum=10,
329
- step=0.1,
330
- value=3,
331
- )
332
- sas_inference_steps = gr.Slider(
333
- label="SA-Solver inference steps",
334
- minimum=10,
335
- maximum=40,
336
  step=1,
337
- value=25,
338
  )
339
 
340
  gr.Examples(
 
48
  "negative_prompt": "anime, cartoon, graphic, text, painting, crayon, graphite, abstract, glitch, deformed, mutated, ugly, disfigured",
49
  },
50
  {
51
+ "name": "Realistic",
52
+ "prompt": "Photorealistic {prompt} . Ulta-realistic, professional, 4k, highly detailed",
53
+ "negative_prompt": "drawing, painting, crayon, sketch, graphite, impressionist, noisy, blurry, soft, deformed, ugly, disfigured",
54
  },
55
  {
56
  "name": "Anime",
 
92
 
93
  styles = {k["name"]: (k["prompt"], k["negative_prompt"]) for k in style_list}
94
  STYLE_NAMES = list(styles.keys())
95
+ DEFAULT_STYLE_NAME = "Realistic"
96
  SCHEDULE_NAME = ["DPM-Solver", "SA-Solver"]
97
  DEFAULT_SCHEDULE_NAME = "DPM-Solver"
98
  NUM_IMAGES_PER_PROMPT = 1
 
165
  use_negative_prompt: bool = False,
166
  num_imgs: int = 1,
167
  seed: int = 0,
168
+ width: int = 400,
169
+ height: int = 400,
170
  schedule: str = 'DPM-Solver',
171
+ dpms_guidance_scale: float = 3.5,
172
  sas_guidance_scale: float = 3,
173
+ dpms_inference_steps: int = 9,
174
  sas_inference_steps: int = 25,
175
  randomize_seed: bool = False,
176
  use_resolution_binning: bool = True,
 
216
 
217
 
218
  examples = [
219
+ "A Monkey with a happy face in the Sahara desert.",
220
+ "Eiffel Tower was Made up of ICE to look like a cloud, with the bell tower at the top of the building.",
221
+ "3D small, round, fluffy creature with big, expressive eyes explores a vibrant, enchanted forest. The creature, a whimsical blend of a rabbit and a squirrel, has soft blue fur and a bushy, striped tail. It hops along a sparkling stream, its eyes wide with wonder. The forest is alive with magical elements: flowers that glow and change colors, trees with leaves in shades of purple and silver, and small floating lights that resemble fireflies. The creature stops to interact playfully with a group of tiny, fairy-like beings dancing around a mushroom ring. The creature looks up in awe at a large, glowing tree that seems to be the heart of the forest.",
222
  "Color photo of a corgi made of transparent glass, standing on the riverside in Yosemite National Park.",
223
+ "A close-up photo of a woman. She wore a blue coat with a gray dress underneath. She has blue eyes and blond hair, and wears a pair of earrings. Behind are blurred city buildings and streets.",
224
  "A litter of golden retriever puppies playing in the snow. Their heads pop out of the snow, covered in.",
225
  "a handsome young boy in the middle with sky color background wearing eye glasses, it's super detailed with anime style, it's a portrait with delicated eyes and nice looking face",
226
  "an astronaut sitting in a diner, eating fries, cinematic, analog film",
227
+ "Pirate ship trapped in a cosmic maelstrom nebula, rendered in cosmic beach whirlpool engine, volumetric lighting, spectacular, ambient lights, intricate detail.",
228
  "professional portrait photo of an anthropomorphic cat wearing fancy gentleman hat and jacket walking in autumn forest.",
229
+ "Outside View from Hotel Made up of Chocolate in space.",
230
  ]
231
 
232
  with gr.Blocks(css="style.css") as demo:
 
252
  with gr.Group():
253
  with gr.Row():
254
  use_negative_prompt = gr.Checkbox(label="Use negative prompt", value=False, visible=True)
 
 
 
 
 
 
 
 
 
 
255
  num_imgs = gr.Slider(
256
  label="Num Images",
257
  minimum=1,
 
287
  minimum=256,
288
  maximum=MAX_IMAGE_SIZE,
289
  step=32,
290
+ value=400,
291
  )
292
  height = gr.Slider(
293
  label="Height",
294
  minimum=256,
295
  maximum=MAX_IMAGE_SIZE,
296
  step=32,
297
+ value=400,
298
  )
299
  with gr.Row():
300
  dpms_guidance_scale = gr.Slider(
301
+ label="Temprature",
302
+ minimum=3,
303
+ maximum=4,
304
  step=0.1,
305
+ value=3.5,
306
  )
307
  dpms_inference_steps = gr.Slider(
308
+ label="Steps",
309
  minimum=5,
310
+ maximum=25,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
311
  step=1,
312
+ value=9,
313
  )
314
 
315
  gr.Examples(