fffiloni commited on
Commit
0736762
·
1 Parent(s): 8eb93c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -24,7 +24,7 @@ source_img = gr.Image(source="upload")
24
  gallery = gr.Gallery(label="Generated images", show_label=False, elem_id="gallery").style(grid=[2], height="auto")
25
 
26
  def infer(prompt, init_image):
27
- init_image = Image.open(BytesIO(init_image)).convert("RGB")
28
  init_image = init_image.resize((768, 512))
29
  #image = pipe(prompt, init_image=init_image)["sample"][0]
30
  images_list = pipe([prompt] * 2, init_image="init_image.png", strength=0.75)
 
24
  gallery = gr.Gallery(label="Generated images", show_label=False, elem_id="gallery").style(grid=[2], height="auto")
25
 
26
  def infer(prompt, init_image):
27
+ init_image = Image.open(init_image).convert("RGB")
28
  init_image = init_image.resize((768, 512))
29
  #image = pipe(prompt, init_image=init_image)["sample"][0]
30
  images_list = pipe([prompt] * 2, init_image="init_image.png", strength=0.75)