rafaaa2105 commited on
Commit
8dae870
1 Parent(s): fc8e9a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -52,16 +52,17 @@ with gr.Blocks() as demo:
52
  with gr.Group():
53
  model_dropdown = gr.Dropdown(choices=list(models.keys()), value=model_list[0] if model_list else None, label="Model")
54
  prompt = gr.Textbox(label="Prompt")
55
- with gr.Accordion("Advanced", open=False):
56
- negative_prompt = gr.Textbox(label="Negative Prompt", value="verybadimagenegative_v1.3, ng_deepnegative_v1_75t, (ugly face:0.8),cross-eyed,sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, normal quality, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, bad anatomy, DeepNegative, facing away, tilted head, {Multiple people}, lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worstquality, low quality, normal quality, jpegartifacts, signature, watermark, username, blurry, bad feet, cropped, poorly drawn hands, poorly drawn face, mutation, deformed, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, extra fingers, fewer digits, extra limbs, extra arms,extra legs, malformed limbs, fused fingers, too many fingers, long neck, cross-eyed,mutated hands, polar lowres, bad body, bad proportions, gross proportions, text, error, missing fingers, missing arms, missing legs, extra digit, extra arms, extra leg, extra foot, ((repeating hair))")
57
- num_inference_steps = gr.Slider(minimum=10, maximum=50, step=1, value=25, label="Number of Inference Steps")
58
- guidance_scale = gr.Slider(minimum=1, maximum=20, step=0.5, value=7.5, label="Guidance Scale")
59
- height = gr.Slider(minimum=1024, maximum=2048, step=256, value=1024, label="Height")
60
- width = gr.Slider(minimum=1024, maximum=2048, step=256, value=1024, label="Width")
61
- num_images = gr.Slider(minimum=1, maximum=4, step=1, value=4, label="Number of Images")
62
  generate_btn = gr.Button("Generate Image")
 
 
 
 
 
 
 
63
  with gr.Column():
64
  output_gallery = gr.Gallery(label="Generated Images", height=480, scale=1)
 
65
  generate_btn.click(generate_images, inputs=[model_dropdown, prompt, negative_prompt, num_inference_steps, guidance_scale, height, width, num_images], outputs=output_gallery)
66
 
67
  demo.launch()
 
52
  with gr.Group():
53
  model_dropdown = gr.Dropdown(choices=list(models.keys()), value=model_list[0] if model_list else None, label="Model")
54
  prompt = gr.Textbox(label="Prompt")
 
 
 
 
 
 
 
55
  generate_btn = gr.Button("Generate Image")
56
+ with gr.Accordion("Advanced", open=False):
57
+ negative_prompt = gr.Textbox(label="Negative Prompt", value="lowres, (bad), text, error, fewer, extra, missing, worst quality, jpeg artifacts, low quality, watermark, unfinished, displeasing, oldest, early, chromatic aberration, signature, extra digits, artistic error, username, scan, [abstract]")
58
+ num_inference_steps = gr.Slider(minimum=10, maximum=50, step=1, value=25, label="Number of Inference Steps")
59
+ guidance_scale = gr.Slider(minimum=1, maximum=20, step=0.5, value=7.5, label="Guidance Scale")
60
+ height = gr.Slider(minimum=1024, maximum=2048, step=256, value=1024, label="Height")
61
+ width = gr.Slider(minimum=1024, maximum=2048, step=256, value=1024, label="Width")
62
+ num_images = gr.Slider(minimum=1, maximum=4, step=1, value=4, label="Number of Images")
63
  with gr.Column():
64
  output_gallery = gr.Gallery(label="Generated Images", height=480, scale=1)
65
+
66
  generate_btn.click(generate_images, inputs=[model_dropdown, prompt, negative_prompt, num_inference_steps, guidance_scale, height, width, num_images], outputs=output_gallery)
67
 
68
  demo.launch()