Spaces:
Running
Running
kayfahaarukku
commited on
Commit
•
7185cf4
1
Parent(s):
168e3c8
Update metadata collapsible
Browse files
app.py
CHANGED
@@ -48,7 +48,7 @@ def generate_image(prompt, negative_prompt, use_defaults, resolution, guidance_s
|
|
48 |
|
49 |
torch.cuda.empty_cache()
|
50 |
|
51 |
-
metadata_text = f"{prompt}\nNegative prompt: {negative_prompt}\nSteps: {num_inference_steps}, Size: {width}x{height}, Seed: {seed}, CFG scale: {guidance_scale}"
|
52 |
|
53 |
return image, seed, metadata_text
|
54 |
|
@@ -87,7 +87,8 @@ with gr.Blocks(title="UrangDiffusion 1.0 Demo", theme="NoCrypt/miku@1.2.1") as d
|
|
87 |
|
88 |
with gr.Column():
|
89 |
output_image = gr.Image(type="pil", label="Generated Image")
|
90 |
-
|
|
|
91 |
gr.Markdown(
|
92 |
"""
|
93 |
### Recommended prompt formatting:
|
@@ -117,4 +118,4 @@ with gr.Blocks(title="UrangDiffusion 1.0 Demo", theme="NoCrypt/miku@1.2.1") as d
|
|
117 |
]
|
118 |
)
|
119 |
|
120 |
-
demo.queue(max_size=20).launch(share=False)
|
|
|
48 |
|
49 |
torch.cuda.empty_cache()
|
50 |
|
51 |
+
metadata_text = f"{prompt}\nNegative prompt: {negative_prompt}\nSteps: {num_inference_steps}, Sampler: Euler a, Size: {width}x{height}, Seed: {seed}, CFG scale: {guidance_scale}"
|
52 |
|
53 |
return image, seed, metadata_text
|
54 |
|
|
|
87 |
|
88 |
with gr.Column():
|
89 |
output_image = gr.Image(type="pil", label="Generated Image")
|
90 |
+
with gr.Accordion("Metadata", open=False):
|
91 |
+
metadata_textbox = gr.Textbox(lines=6, label="Image Metadata", interactive=False, max_lines=6)
|
92 |
gr.Markdown(
|
93 |
"""
|
94 |
### Recommended prompt formatting:
|
|
|
118 |
]
|
119 |
)
|
120 |
|
121 |
+
demo.queue(max_size=20).launch(share=False)
|