Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
34cb1b5
1
Parent(s):
3509a66
Update app.py
Browse files
app.py
CHANGED
@@ -35,7 +35,7 @@ pipe_hyper.to("cuda")
|
|
35 |
|
36 |
|
37 |
@spaces.GPU
|
38 |
-
def
|
39 |
image_turbo=pipe_turbo(prompt=prompt, num_inference_steps=1, guidance_scale=0).images[0]
|
40 |
image_lightning=pipe_lightning(prompt=prompt, num_inference_steps=1, guidance_scale=0).images[0]
|
41 |
image_hyper=pipe_hyper(prompt=prompt, num_inference_steps=1, guidance_scale=0, timesteps=[800]).images[0]
|
@@ -52,4 +52,5 @@ with gr.Blocks(css=css) as demo:
|
|
52 |
image_turbo = gr.Image(label="SDXL Turbo")
|
53 |
image_lightning = gr.Image(label="SDXL Lightning")
|
54 |
image_hyper = gr.Image("Hyper SDXL")
|
55 |
-
|
|
|
|
35 |
|
36 |
|
37 |
@spaces.GPU
|
38 |
+
def run_comparison(prompt):
|
39 |
image_turbo=pipe_turbo(prompt=prompt, num_inference_steps=1, guidance_scale=0).images[0]
|
40 |
image_lightning=pipe_lightning(prompt=prompt, num_inference_steps=1, guidance_scale=0).images[0]
|
41 |
image_hyper=pipe_hyper(prompt=prompt, num_inference_steps=1, guidance_scale=0, timesteps=[800]).images[0]
|
|
|
52 |
image_turbo = gr.Image(label="SDXL Turbo")
|
53 |
image_lightning = gr.Image(label="SDXL Lightning")
|
54 |
image_hyper = gr.Image("Hyper SDXL")
|
55 |
+
|
56 |
+
run.click(fn=run_comparison, inputs=prompt, outputs=[image_turbo, image_lightning, image_hyper])
|