Update app.py
Browse files
app.py
CHANGED
|
@@ -21,11 +21,11 @@ apply_hidiffusion(pipe)
|
|
| 21 |
apply_hidiffusion(pipe_15)
|
| 22 |
|
| 23 |
@spaces.GPU
|
| 24 |
-
def run_hidiffusion(prompt, negative_prompt, progress=gr.Progress(track_tqdm=True)):
|
| 25 |
return pipe(prompt, guidance_scale=7.5, height=2048, width=2048, eta=1.0, negative_prompt=negative_prompt, num_inference_steps=25).images[0]
|
| 26 |
|
| 27 |
@spaces.GPU
|
| 28 |
-
def run_hidiffusion_15(prompt, negative_prompt, progress=gr.Progress(track_tqdm=True)):
|
| 29 |
return pipe_15(prompt, guidance_scale=7.5, height=1024, width=1024, eta=1.0, negative_prompt=negative_prompt, num_inference_steps=25).images[0]
|
| 30 |
|
| 31 |
with gr.Blocks() as demo:
|
|
@@ -43,10 +43,11 @@ with gr.Blocks() as demo:
|
|
| 43 |
btn_15 = gr.Button("Run")
|
| 44 |
output = gr.Image(label="Result")
|
| 45 |
gr.Examples(examples=[
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
], inputs=[prompt
|
|
|
|
| 50 |
btn.click(fn=run_hidiffusion, inputs=[prompt, negative_prompt], outputs=[output])
|
| 51 |
btn_15.click(fn=run_hidiffusion, inputs=[prompt_15, negative_prompt_15], outputs=[output])
|
| 52 |
demo.launch()
|
|
|
|
| 21 |
apply_hidiffusion(pipe_15)
|
| 22 |
|
| 23 |
@spaces.GPU
|
| 24 |
+
def run_hidiffusion(prompt, negative_prompt="", progress=gr.Progress(track_tqdm=True)):
|
| 25 |
return pipe(prompt, guidance_scale=7.5, height=2048, width=2048, eta=1.0, negative_prompt=negative_prompt, num_inference_steps=25).images[0]
|
| 26 |
|
| 27 |
@spaces.GPU
|
| 28 |
+
def run_hidiffusion_15(prompt, negative_prompt="", progress=gr.Progress(track_tqdm=True)):
|
| 29 |
return pipe_15(prompt, guidance_scale=7.5, height=1024, width=1024, eta=1.0, negative_prompt=negative_prompt, num_inference_steps=25).images[0]
|
| 30 |
|
| 31 |
with gr.Blocks() as demo:
|
|
|
|
| 43 |
btn_15 = gr.Button("Run")
|
| 44 |
output = gr.Image(label="Result")
|
| 45 |
gr.Examples(examples=[
|
| 46 |
+
"Echoes of a forgotten song drift across the moonlit sea, where a ghost ship sails, its spectral crew bound to an eternal quest for redemption.",
|
| 47 |
+
"Roger rabbit as a real person, photorealistic, cinematic.",
|
| 48 |
+
"tanding tall amidst the ruins, a stone golem awakens, vines and flowers sprouting from the crevices in its body."
|
| 49 |
+
], inputs=[prompt], outputs=[output], fn=run_hidiffusion)
|
| 50 |
+
|
| 51 |
btn.click(fn=run_hidiffusion, inputs=[prompt, negative_prompt], outputs=[output])
|
| 52 |
btn_15.click(fn=run_hidiffusion, inputs=[prompt_15, negative_prompt_15], outputs=[output])
|
| 53 |
demo.launch()
|