weifeng-chen commited on
Commit
8a3cc0d
β€’
1 Parent(s): 078bead

diffuser version fix

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -16,10 +16,8 @@ def resize(w_val,l_val,img):
16
 
17
 
18
  def infer(prompt, guide, steps, width, height):
19
- image_list = pipe_text2img([prompt], guidance_scale=guide, num_inference_steps=steps, width=width, height=height)
20
- images = []
21
- for i, image in enumerate(image_list["sample"]):
22
- images.append(image)
23
  return image
24
 
25
  gr.Interface(fn=infer, inputs=
 
16
 
17
 
18
  def infer(prompt, guide, steps, width, height):
19
+ images = pipe_text2img(prompt, guidance_scale=guide, num_inference_steps=steps, width=width, height=height)
20
+ image = images[0]
 
 
21
  return image
22
 
23
  gr.Interface(fn=infer, inputs=