Update app.py
Browse files
app.py
CHANGED
@@ -20,6 +20,10 @@ pipe = StableDiffusionPipeline.from_pretrained(pretrain_model, scheduler = sched
|
|
20 |
# Apply hidiffusion with a single line of code.
|
21 |
apply_hidiffusion(pipe)
|
22 |
|
|
|
|
|
|
|
|
|
23 |
with gr.Blocks() as demo:
|
24 |
prompt = gr.Textbox()
|
25 |
negative_prompt = gr.Textbox()
|
@@ -28,8 +32,4 @@ with gr.Blocks() as demo:
|
|
28 |
|
29 |
btn.click(fn=run_hidiffusion, inputs=[prompt, negative_prompt], outputs=[output])
|
30 |
|
31 |
-
@spaces.GPU
|
32 |
-
def run_hidiffusion(prompt, negative_prompt):
|
33 |
-
return pipe(prompt, guidance_scale=7.5, height=1024, width=1024, eta=1.0, negative_prompt=negative_prompt).images[0]
|
34 |
-
|
35 |
demo.launch()
|
|
|
20 |
# Apply hidiffusion with a single line of code.
|
21 |
apply_hidiffusion(pipe)
|
22 |
|
23 |
+
@spaces.GPU
|
24 |
+
def run_hidiffusion(prompt, negative_prompt):
|
25 |
+
return pipe(prompt, guidance_scale=7.5, height=1024, width=1024, eta=1.0, negative_prompt=negative_prompt).images[0]
|
26 |
+
|
27 |
with gr.Blocks() as demo:
|
28 |
prompt = gr.Textbox()
|
29 |
negative_prompt = gr.Textbox()
|
|
|
32 |
|
33 |
btn.click(fn=run_hidiffusion, inputs=[prompt, negative_prompt], outputs=[output])
|
34 |
|
|
|
|
|
|
|
|
|
35 |
demo.launch()
|