fffiloni commited on
Commit
e7ebe4c
1 Parent(s): 6809a62

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -22,9 +22,7 @@ pipe.to(device)
22
 
23
  source_img = gr.Image(image_mode="RGB",
24
  source="upload",
25
- type="filepath",
26
- shape=None,
27
- invert_colors=False)
28
 
29
  gallery = gr.Gallery(label="Generated images", show_label=False, elem_id="gallery").style(grid=[2], height="auto")
30
 
@@ -37,8 +35,8 @@ def resize(width,img):
37
  return img
38
 
39
  def infer(prompt, init_image):
40
- init_image = resize(512,init_image)
41
- init_image = init_image.save("init_image.png")
42
  #image = pipe(prompt, init_image=init_image)["sample"][0]
43
  images_list = pipe([prompt] * 2, init_image=init_image, strength=0.75)
44
  images = []
 
22
 
23
  source_img = gr.Image(image_mode="RGB",
24
  source="upload",
25
+ type="filepath")
 
 
26
 
27
  gallery = gr.Gallery(label="Generated images", show_label=False, elem_id="gallery").style(grid=[2], height="auto")
28
 
 
35
  return img
36
 
37
  def infer(prompt, init_image):
38
+ #init_image = resize(512,init_image)
39
+ #init_image = init_image.save("init_image.png")
40
  #image = pipe(prompt, init_image=init_image)["sample"][0]
41
  images_list = pipe([prompt] * 2, init_image=init_image, strength=0.75)
42
  images = []