Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -87,6 +87,9 @@ def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance
|
|
87 |
generator=generator
|
88 |
).images[0]
|
89 |
|
|
|
|
|
|
|
90 |
return output_image
|
91 |
|
92 |
|
@@ -117,7 +120,14 @@ with gr.Blocks(css=css) as demo:
|
|
117 |
|
118 |
run_button = gr.Button("Run", scale=0)
|
119 |
|
120 |
-
result = gr.Image(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
|
122 |
with gr.Accordion("Advanced Settings", open=False):
|
123 |
|
|
|
87 |
generator=generator
|
88 |
).images[0]
|
89 |
|
90 |
+
# PNGに変換する
|
91 |
+
output_image = output_image.convert("RGBA")
|
92 |
+
|
93 |
return output_image
|
94 |
|
95 |
|
|
|
120 |
|
121 |
run_button = gr.Button("Run", scale=0)
|
122 |
|
123 |
+
result = gr.Image(
|
124 |
+
label="Result",
|
125 |
+
show_label=False,
|
126 |
+
type="pil",
|
127 |
+
elem_id="output_image",
|
128 |
+
show_download_button=True,
|
129 |
+
file_format="png"
|
130 |
+
)
|
131 |
|
132 |
with gr.Accordion("Advanced Settings", open=False):
|
133 |
|