Update app.py
Browse files
app.py
CHANGED
|
@@ -46,6 +46,16 @@ def generate_image(prompt, height, width, num_inference_steps, guidance_scale):
|
|
| 46 |
).images[0]
|
| 47 |
return image, seed
|
| 48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
# Gradio interface
|
| 50 |
iface = gr.Interface(
|
| 51 |
fn=generate_image,
|
|
@@ -53,14 +63,15 @@ iface = gr.Interface(
|
|
| 53 |
gr.Textbox(label="Prompt"),
|
| 54 |
gr.Slider(512, 1344, 1024, step=64, label="Height"),
|
| 55 |
gr.Slider(512, 1344, 1024, step=64, label="Width"),
|
| 56 |
-
gr.Slider(20,
|
| 57 |
gr.Slider(1, 20, 5, step=0.5, label="Guidance Scale"),
|
| 58 |
],
|
| 59 |
outputs=[
|
| 60 |
gr.Image(label="Generated Image"),
|
| 61 |
gr.Number(label="Seed")
|
| 62 |
],
|
| 63 |
-
title="Kolors
|
|
|
|
| 64 |
theme='bethecloud/storj_theme',
|
| 65 |
)
|
| 66 |
|
|
|
|
| 46 |
).images[0]
|
| 47 |
return image, seed
|
| 48 |
|
| 49 |
+
description = """
|
| 50 |
+
<p align="center">Effective Training of Diffusion Model for Photorealistic Text-to-Image Synthesis</p>
|
| 51 |
+
<p><center>
|
| 52 |
+
<a href="https://kolors.kuaishou.com/" target="_blank">[Official Website]</a>
|
| 53 |
+
<a href="https://github.com/Kwai-Kolors/Kolors/blob/master/imgs/Kolors_paper.pdf" target="_blank">[Tech Report]</a>
|
| 54 |
+
<a href="https://huggingface.co/Kwai-Kolors/Kolors" target="_blank">[Model Page]</a>
|
| 55 |
+
<a href="https://github.com/Kwai-Kolors/Kolors" target="_blank">[Github]</a>
|
| 56 |
+
</center></p>
|
| 57 |
+
"""
|
| 58 |
+
|
| 59 |
# Gradio interface
|
| 60 |
iface = gr.Interface(
|
| 61 |
fn=generate_image,
|
|
|
|
| 63 |
gr.Textbox(label="Prompt"),
|
| 64 |
gr.Slider(512, 1344, 1024, step=64, label="Height"),
|
| 65 |
gr.Slider(512, 1344, 1024, step=64, label="Width"),
|
| 66 |
+
gr.Slider(20, 50, 20, step=1, label="Number of Inference Steps"),
|
| 67 |
gr.Slider(1, 20, 5, step=0.5, label="Guidance Scale"),
|
| 68 |
],
|
| 69 |
outputs=[
|
| 70 |
gr.Image(label="Generated Image"),
|
| 71 |
gr.Number(label="Seed")
|
| 72 |
],
|
| 73 |
+
title="Kolors",
|
| 74 |
+
description=description,
|
| 75 |
theme='bethecloud/storj_theme',
|
| 76 |
)
|
| 77 |
|