Spaces:
Nymbo
/
Running on CPU Upgrade

Rooni commited on
Commit
22ebab0
1 Parent(s): c0b30e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -95,14 +95,16 @@ with gr.Blocks(css=css) as dalle:
95
 
96
  with gr.Tab("Расширенные настройки"):
97
  negative_prompt = gr.Textbox(label="Negative Prompt", placeholder="Чего не должно быть на изображении", value="[deformed | disfigured], poorly drawn, [bad : wrong] anatomy, [extra | missing | floating | disconnected] limb, (mutated hands and fingers), blurry, text, fuzziness", lines=3, elem_id="negative-prompt-text-input")
98
- steps = gr.Slider(label="Sampling steps", value=30, minimum=1, maximum=100, step=1)
99
  cfg = gr.Slider(label="CFG Scale", value=7, minimum=1, maximum=20, step=1)
 
 
100
 
101
  with gr.Row():
102
  text_button = gr.Button("Генерация", variant='primary', elem_id="gen-button")
103
  with gr.Row():
104
  image_output = gr.Image(type="pil", label="Изображение", elem_id="gallery")
105
 
106
- text_button.click(query, inputs=[text_prompt, model, negative_prompt, steps, cfg], outputs=image_output)
107
 
108
  dalle.launch(show_api=False)
 
95
 
96
  with gr.Tab("Расширенные настройки"):
97
  negative_prompt = gr.Textbox(label="Negative Prompt", placeholder="Чего не должно быть на изображении", value="[deformed | disfigured], poorly drawn, [bad : wrong] anatomy, [extra | missing | floating | disconnected] limb, (mutated hands and fingers), blurry, text, fuzziness", lines=3, elem_id="negative-prompt-text-input")
98
+ steps = gr.Slider(label="Sampling steps", value=35, minimum=1, maximum=100, step=1)
99
  cfg = gr.Slider(label="CFG Scale", value=7, minimum=1, maximum=20, step=1)
100
+ method = gr.Radio(label="Sampling method", value="DPM++ 2M Karras", choices=["DPM++ 2M Karras", "DPM++ SDE Karras", "Euler", "Euler a", "Heun", "DDIM"])
101
+
102
 
103
  with gr.Row():
104
  text_button = gr.Button("Генерация", variant='primary', elem_id="gen-button")
105
  with gr.Row():
106
  image_output = gr.Image(type="pil", label="Изображение", elem_id="gallery")
107
 
108
+ text_button.click(query, inputs=[text_prompt, model, negative_prompt, steps, cfg, method], outputs=image_output)
109
 
110
  dalle.launch(show_api=False)