frogleo commited on
Commit
629d861
·
1 Parent(s): 0dce70d

尝试修改版本

Browse files
__pycache__/config.cpython-310.pyc CHANGED
Binary files a/__pycache__/config.cpython-310.pyc and b/__pycache__/config.cpython-310.pyc differ
 
__pycache__/utils.cpython-310.pyc CHANGED
Binary files a/__pycache__/utils.cpython-310.pyc and b/__pycache__/utils.cpython-310.pyc differ
 
app.py CHANGED
@@ -177,10 +177,9 @@ def generate(
177
  callback_on_step_end=callback2
178
  ).images
179
  out_img = images[0]
180
- png_io = io.BytesIO()
181
- out_img.save(png_io, format="PNG")
182
- png_io.seek(0)
183
- return Image.open(png_io)
184
  except GenerationError as e:
185
  logger.warning(f"Generation validation error: {str(e)}")
186
  raise gr.Error(str(e))
@@ -307,7 +306,6 @@ with gr.Blocks(css=custom_css).queue() as demo:
307
  with gr.Column():
308
  gr.Markdown("### Output")
309
  result = gr.Image(
310
- image_mode="RGBA",
311
  label="Generated Image",
312
  elem_id="output-image"
313
  )
 
177
  callback_on_step_end=callback2
178
  ).images
179
  out_img = images[0]
180
+ out_img = out_img.convert("RGB")
181
+ progress(1, desc="Complete")
182
+ return out_img
 
183
  except GenerationError as e:
184
  logger.warning(f"Generation validation error: {str(e)}")
185
  raise gr.Error(str(e))
 
306
  with gr.Column():
307
  gr.Markdown("### Output")
308
  result = gr.Image(
 
309
  label="Generated Image",
310
  elem_id="output-image"
311
  )
requirements.txt CHANGED
@@ -1,6 +1,6 @@
1
  accelerate>=1.2.1
2
  diffusers>=0.32.1
3
- gradio==4.44.1
4
  hf-transfer>=0.1.9
5
  spaces>=0.32.0
6
  torch>=2.4.0
 
1
  accelerate>=1.2.1
2
  diffusers>=0.32.1
3
+ gradio>=4.44.1
4
  hf-transfer>=0.1.9
5
  spaces>=0.32.0
6
  torch>=2.4.0