el-el-san commited on
Commit
aeeb1c2
1 Parent(s): 1009376

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
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(label="Result", show_label=False)
 
 
 
 
 
 
 
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