Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
ddbaa70
1
Parent(s):
d452942
Update app.py
Browse files
app.py
CHANGED
@@ -63,6 +63,16 @@ def run_comparison(prompt):
|
|
63 |
image_hyper=pipe_hyper(prompt=prompt, num_inference_steps=1, guidance_scale=0, timesteps=[800]).images[0]
|
64 |
return image_turbo, image_lightning, image_hyper
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
with gr.Blocks() as demo:
|
67 |
gr.Markdown("## One step SDXL comparison 🦶")
|
68 |
gr.Markdown('Compare SDXL variants and distillations able to generate images in a single diffusion step')
|
@@ -78,12 +88,17 @@ with gr.Blocks() as demo:
|
|
78 |
with gr.Column():
|
79 |
image_hyper = gr.Image(label="Hyper SDXL")
|
80 |
gr.Markdown("## [Hyper SDXL](https://huggingface.co/ByteDance/Hyper-SD)")
|
81 |
-
|
82 |
gr.on(
|
83 |
triggers=[prompt.submit, run.click],
|
84 |
fn=run_comparison,
|
85 |
inputs=prompt,
|
86 |
-
outputs=
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
)
|
88 |
-
|
89 |
demo.launch()
|
|
|
63 |
image_hyper=pipe_hyper(prompt=prompt, num_inference_steps=1, guidance_scale=0, timesteps=[800]).images[0]
|
64 |
return image_turbo, image_lightning, image_hyper
|
65 |
|
66 |
+
examples =
|
67 |
+
["A dignified beaver wearing glasses, a vest, and colorful neck tie.",
|
68 |
+
"The spirit of a tamagotchi wandering in the city of Barcelona",
|
69 |
+
"an ornate, high-backed mahogany chair with a red cushion",
|
70 |
+
"a sketch of a camel next to a stream",
|
71 |
+
"a delicate porcelain teacup sits on a saucer, its surface adorned with intricate blue patterns",
|
72 |
+
"a baby swan grafitti",
|
73 |
+
"A bald eagle made of chocolate powder, mango, and whipped cream"
|
74 |
+
]
|
75 |
+
|
76 |
with gr.Blocks() as demo:
|
77 |
gr.Markdown("## One step SDXL comparison 🦶")
|
78 |
gr.Markdown('Compare SDXL variants and distillations able to generate images in a single diffusion step')
|
|
|
88 |
with gr.Column():
|
89 |
image_hyper = gr.Image(label="Hyper SDXL")
|
90 |
gr.Markdown("## [Hyper SDXL](https://huggingface.co/ByteDance/Hyper-SD)")
|
91 |
+
image_outputs = [image_turbo, image_lightning, image_hyper]
|
92 |
gr.on(
|
93 |
triggers=[prompt.submit, run.click],
|
94 |
fn=run_comparison,
|
95 |
inputs=prompt,
|
96 |
+
outputs=image_outputs
|
97 |
+
)
|
98 |
+
gr.Examples(
|
99 |
+
examples=examples,
|
100 |
+
fn=run_comparison,
|
101 |
+
inputs=prompt,
|
102 |
+
outputs=image_outputs
|
103 |
)
|
|
|
104 |
demo.launch()
|