boroll2347 commited on
Commit
698d6fe
·
verified ·
1 Parent(s): 661d6f5

Set output image format to PNG for higher quality

Browse files

By default, Gradio `Image` and `Gallery` serve the output image recompressed to a terrible-quality WebP; setting the format explicitly to a lossless format avoids that behavior.

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -421,7 +421,8 @@ with gr.Blocks(css=css) as WeShop:
421
  output = gr.Image(
422
  label="Pose Change Result",
423
  elem_classes=["image-container", "hide-buttons"],
424
- interactive=False
 
425
  )
426
  with gr.Row():
427
  submit_button = gr.Button("Generate")
 
421
  output = gr.Image(
422
  label="Pose Change Result",
423
  elem_classes=["image-container", "hide-buttons"],
424
+ interactive=False,
425
+ format="png",
426
  )
427
  with gr.Row():
428
  submit_button = gr.Button("Generate")