Spaces:
Runtime error
Runtime error
support for ImageSlider
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
from pipeline_demofusion_sdxl import DemoFusionSDXLPipeline
|
3 |
import torch
|
4 |
|
@@ -24,7 +25,8 @@ def generate_images(prompt, negative_prompt, height, width, num_inference_steps,
|
|
24 |
multi_decoder=True, show_image=False
|
25 |
)
|
26 |
|
27 |
-
return [image for _, image in enumerate(images)]
|
|
|
28 |
|
29 |
iface = gr.Interface(
|
30 |
fn=generate_images,
|
@@ -43,7 +45,8 @@ iface = gr.Interface(
|
|
43 |
gr.Slider(minimum=8, maximum=96, step=8, value=64, label="Stride"),
|
44 |
gr.Number(label="Seed", value=2013)
|
45 |
],
|
46 |
-
outputs=gr.Gallery(label="Generated Images"),
|
|
|
47 |
title="DemoFusion Gradio Demo",
|
48 |
description="Generate images with the DemoFusion SDXL Pipeline. Runs on A100 GPU."
|
49 |
)
|
|
|
1 |
import gradio as gr
|
2 |
+
from gradio_imageslider import ImageSlider
|
3 |
from pipeline_demofusion_sdxl import DemoFusionSDXLPipeline
|
4 |
import torch
|
5 |
|
|
|
25 |
multi_decoder=True, show_image=False
|
26 |
)
|
27 |
|
28 |
+
#return [image for _, image in enumerate(images)]
|
29 |
+
return (images[0], images[-1])
|
30 |
|
31 |
iface = gr.Interface(
|
32 |
fn=generate_images,
|
|
|
45 |
gr.Slider(minimum=8, maximum=96, step=8, value=64, label="Stride"),
|
46 |
gr.Number(label="Seed", value=2013)
|
47 |
],
|
48 |
+
#outputs=gr.Gallery(label="Generated Images"),
|
49 |
+
outputs=ImageSlider(label="Comparison of SDXL and DemoFusion"),
|
50 |
title="DemoFusion Gradio Demo",
|
51 |
description="Generate images with the DemoFusion SDXL Pipeline. Runs on A100 GPU."
|
52 |
)
|