Spaces:
Running
on
Zero
Running
on
Zero
arthur-qiu
commited on
Commit
·
2cd1cf6
1
Parent(s):
cb1f3e2
add turbo
Browse files
app.py
CHANGED
@@ -178,15 +178,22 @@ img[src*='#center'] {
|
|
178 |
}
|
179 |
"""
|
180 |
|
181 |
-
def
|
182 |
if 'Disable Turbo' in options:
|
183 |
-
return gr.Slider(minimum=5,
|
184 |
maximum=60,
|
185 |
-
value=50)
|
|
|
|
|
|
|
186 |
else:
|
187 |
-
return gr.Slider(minimum=2,
|
188 |
maximum=6,
|
189 |
-
value=4)
|
|
|
|
|
|
|
|
|
190 |
|
191 |
with gr.Blocks(css=css) as demo:
|
192 |
with gr.Column(elem_id="col-container"):
|
@@ -236,7 +243,7 @@ with gr.Blocks(css=css) as demo:
|
|
236 |
with gr.Row():
|
237 |
negative_prompt = gr.Textbox(label='Negative Prompt', value='blurry, ugly, duplicate, poorly drawn, deformed, mosaic')
|
238 |
|
239 |
-
options.change(
|
240 |
|
241 |
submit_btn = gr.Button("Generate", variant='primary')
|
242 |
image_result = gr.Image(label="Image Output")
|
|
|
178 |
}
|
179 |
"""
|
180 |
|
181 |
+
def mode_update(options):
|
182 |
if 'Disable Turbo' in options:
|
183 |
+
return [gr.Slider(minimum=5,
|
184 |
maximum=60,
|
185 |
+
value=50),
|
186 |
+
gr.Slider(minimum=1.0,
|
187 |
+
maximum=20.0,
|
188 |
+
value=7.5)
|
189 |
else:
|
190 |
+
return [gr.Slider(minimum=2,
|
191 |
maximum=6,
|
192 |
+
value=4),
|
193 |
+
gr.Slider(minimum=0.0,
|
194 |
+
maximum=0.0,
|
195 |
+
value=0.0)]
|
196 |
+
]
|
197 |
|
198 |
with gr.Blocks(css=css) as demo:
|
199 |
with gr.Column(elem_id="col-container"):
|
|
|
243 |
with gr.Row():
|
244 |
negative_prompt = gr.Textbox(label='Negative Prompt', value='blurry, ugly, duplicate, poorly drawn, deformed, mosaic')
|
245 |
|
246 |
+
options.change(mode_update, options, [ddim_steps, guidance_scale])
|
247 |
|
248 |
submit_btn = gr.Button("Generate", variant='primary')
|
249 |
image_result = gr.Image(label="Image Output")
|