ChenWu98 commited on
Commit
d0546cd
β€’
1 Parent(s): 58ca927

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -15
app.py CHANGED
@@ -373,7 +373,7 @@ with gr.Blocks(css=css) as demo:
373
  with gr.Tab("Other options"):
374
  with gr.Group():
375
  with gr.Row():
376
- num_inference_steps = gr.Slider(label="Number of inference steps", value=100, minimum=25, maximum=500, step=1)
377
  width = gr.Slider(label="Width", value=512, minimum=64, maximum=1024, step=8)
378
  height = gr.Slider(label="Height", value=512, minimum=64, maximum=1024, step=8)
379
 
@@ -391,23 +391,23 @@ with gr.Blocks(css=css) as demo:
391
 
392
  ex = gr.Examples(
393
  [
394
- ["An astronaut riding a horse", "An astronaut riding an elephant", 1, 2, 100, "images/astronaut_horse.png", 0.8, "None", 0, 0],
395
- ["An astronaut riding a horse", "An astronaut riding a elephant", 1, 2, 100, "images/astronaut_horse.png", 0.9, "Replace", 0.15, 0.10],
396
- ["A black colored car.", "A blue colored car.", 1, 3, 100, "images/black_car.png", 0.85, "None", 0, 0],
397
- ["A black colored car.", "A blue colored car.", 1, 5, 100, "images/black_car.png", 0.95, "Replace", 0.8, 0.4],
398
- ["A black colored car.", "A red colored car.", 1, 5, 100, "images/black_car.png", 1, "Replace", 0.8, 0.4],
399
- ["An aerial view of autumn scene.", "An aerial view of winter scene.", 1, 5, 100, "images/mausoleum.png", 0.9, "None", 0, 0],
400
- ["An aerial view of autumn scene.", "An aerial view of winter scene.", 1, 5, 100, "images/mausoleum.png", 1, "Replace", 0.8, 0.4],
401
- ["A green apple and a black backpack on the floor.", "A red apple and a black backpack on the floor.", 1, 7, 100, "images/apple_bag.png", 0.9, "None", 0, 0],
402
- ["A green apple and a black backpack on the floor.", "A red apple and a black backpack on the floor.", 1, 7, 100, "images/apple_bag.png", 0.9, "Replace", 0.8, 0.4],
403
- ["A hotel room with red flowers on the bed.", "A hotel room with a cat sitting on the bed.", 1, 4, 100, "images/flower_hotel.png", 0.8, "None", 0, 0],
404
- ["A hotel room with red flowers on the bed.", "A hotel room with blue flowers on the bed.", 1, 5, 100, "images/flower_hotel.png", 0.95, "None", 0, 0],
405
- ["A green apple and a black backpack on the floor.", "Two green apples and a black backpack on the floor.", 1, 5, 100, "images/apple_bag.png", 0.89, "None", 0, 0],
406
  ],
407
  [source_prompt, target_prompt, source_guidance_scale, guidance_scale, num_inference_steps,
408
- img, strength,
409
  cross_attention_control, cross_replace_steps, self_replace_steps],
410
- image_out, inference, cache_examples=False)
411
 
412
  gr.Markdown('''
413
  Space built with Diffusers 🧨 by HuggingFace πŸ€—.
 
373
  with gr.Tab("Other options"):
374
  with gr.Group():
375
  with gr.Row():
376
+ num_inference_steps = gr.Slider(label="Inference steps", value=100, minimum=25, maximum=500, step=1)
377
  width = gr.Slider(label="Width", value=512, minimum=64, maximum=1024, step=8)
378
  height = gr.Slider(label="Height", value=512, minimum=64, maximum=1024, step=8)
379
 
 
391
 
392
  ex = gr.Examples(
393
  [
394
+ ["An astronaut riding a horse", "An astronaut riding an elephant", 1, 2, 100, 512, 512, 0, "images/astronaut_horse.png", 0.8, "None", 0, 0],
395
+ ["An astronaut riding a horse", "An astronaut riding a elephant", 1, 2, 100, 512, 512, 0, "images/astronaut_horse.png", 0.9, "Replace", 0.15, 0.10],
396
+ ["A black colored car.", "A blue colored car.", 1, 3, 100, 512, 512, 0, "images/black_car.png", 0.85, "None", 0, 0],
397
+ ["A black colored car.", "A blue colored car.", 1, 5, 100, 512, 512, 0, "images/black_car.png", 0.95, "Replace", 0.8, 0.4],
398
+ ["A black colored car.", "A red colored car.", 1, 5, 100, 512, 512, 0, "images/black_car.png", 1, "Replace", 0.8, 0.4],
399
+ ["An aerial view of autumn scene.", "An aerial view of winter scene.", 1, 5, 100, 512, 512, 0, "images/mausoleum.png", 0.9, "None", 0, 0],
400
+ ["An aerial view of autumn scene.", "An aerial view of winter scene.", 1, 5, 100, 512, 512, 0, "images/mausoleum.png", 1, "Replace", 0.8, 0.4],
401
+ ["A green apple and a black backpack on the floor.", "A red apple and a black backpack on the floor.", 1, 7, 100, 512, 512, 0, "images/apple_bag.png", 0.9, "None", 0, 0],
402
+ ["A green apple and a black backpack on the floor.", "A red apple and a black backpack on the floor.", 1, 7, 100, 512, 512, 0, "images/apple_bag.png", 0.9, "Replace", 0.8, 0.4],
403
+ ["A hotel room with red flowers on the bed.", "A hotel room with a cat sitting on the bed.", 1, 4, 100, 512, 512, 0, "images/flower_hotel.png", 0.8, "None", 0, 0],
404
+ ["A hotel room with red flowers on the bed.", "A hotel room with blue flowers on the bed.", 1, 5, 100, 512, 512, 0, "images/flower_hotel.png", 0.95, "None", 0, 0],
405
+ ["A green apple and a black backpack on the floor.", "Two green apples and a black backpack on the floor.", 1, 5, 100, 512, 512, 0, "images/apple_bag.png", 0.89, "None", 0, 0],
406
  ],
407
  [source_prompt, target_prompt, source_guidance_scale, guidance_scale, num_inference_steps,
408
+ width, height, seed, img, strength,
409
  cross_attention_control, cross_replace_steps, self_replace_steps],
410
+ image_out, inference, cache_examples=True)
411
 
412
  gr.Markdown('''
413
  Space built with Diffusers 🧨 by HuggingFace πŸ€—.