Spaces:
Runtime error
Runtime error
Yjiggfghhjnjj
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -96,7 +96,7 @@ with gr.Blocks() as demo:
|
|
| 96 |
gr.Markdown("## One step SDXL comparison 🦶")
|
| 97 |
gr.Markdown('Compare SDXL variants and distillations able to generate images in a single diffusion step')
|
| 98 |
prompt = gr.Textbox(label="Prompt")
|
| 99 |
-
|
| 100 |
with gr.Accordion("Advanced options", open=False):
|
| 101 |
use_negative_prompt = gr.Checkbox(label="Use negative prompt", value=True)
|
| 102 |
negative_prompt = gr.Text(
|
|
@@ -165,13 +165,9 @@ with gr.Blocks() as demo:
|
|
| 165 |
gr.Markdown("## [RealVisXL V3](https://huggingface.co)")
|
| 166 |
image_outputs = [image_r3, image_r4]
|
| 167 |
gr.on(
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
run_button.click,
|
| 172 |
-
],
|
| 173 |
-
fn=run_comparison,
|
| 174 |
-
inputs=[
|
| 175 |
prompt,
|
| 176 |
negative_prompt,
|
| 177 |
use_negative_prompt,
|
|
@@ -183,8 +179,7 @@ with gr.Blocks() as demo:
|
|
| 183 |
guidance_scale,
|
| 184 |
randomize_seed,
|
| 185 |
],
|
| 186 |
-
|
| 187 |
-
api_name="run",
|
| 188 |
)
|
| 189 |
use_negative_prompt.change(
|
| 190 |
fn=lambda x: gr.update(visible=x),
|
|
|
|
| 96 |
gr.Markdown("## One step SDXL comparison 🦶")
|
| 97 |
gr.Markdown('Compare SDXL variants and distillations able to generate images in a single diffusion step')
|
| 98 |
prompt = gr.Textbox(label="Prompt")
|
| 99 |
+
run = gr.Button("Run")
|
| 100 |
with gr.Accordion("Advanced options", open=False):
|
| 101 |
use_negative_prompt = gr.Checkbox(label="Use negative prompt", value=True)
|
| 102 |
negative_prompt = gr.Text(
|
|
|
|
| 165 |
gr.Markdown("## [RealVisXL V3](https://huggingface.co)")
|
| 166 |
image_outputs = [image_r3, image_r4]
|
| 167 |
gr.on(
|
| 168 |
+
triggers=[prompt.submit, run.click],
|
| 169 |
+
fn=run_comparison,
|
| 170 |
+
inputs=[
|
|
|
|
|
|
|
|
|
|
|
|
|
| 171 |
prompt,
|
| 172 |
negative_prompt,
|
| 173 |
use_negative_prompt,
|
|
|
|
| 179 |
guidance_scale,
|
| 180 |
randomize_seed,
|
| 181 |
],
|
| 182 |
+
outputs=image_outputs
|
|
|
|
| 183 |
)
|
| 184 |
use_negative_prompt.change(
|
| 185 |
fn=lambda x: gr.update(visible=x),
|