Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,8 @@ pipe.to(device)
|
|
22 |
gallery = gr.Gallery(label="Generated images", show_label=False, elem_id="gallery").style(grid=[2], height="auto")
|
23 |
|
24 |
def infer(prompt, init_image):
|
25 |
-
|
|
|
26 |
#image = pipe(prompt, init_image=init_image)["sample"][0]
|
27 |
images_list = pipe([prompt] * 2, init_image=init_image, strength=0.75)
|
28 |
images = []
|
|
|
22 |
gallery = gr.Gallery(label="Generated images", show_label=False, elem_id="gallery").style(grid=[2], height="auto")
|
23 |
|
24 |
def infer(prompt, init_image):
|
25 |
+
init_image = Image.open(init_image).convert("RGB")
|
26 |
+
init_image = init_image.resize((512, 512))
|
27 |
#image = pipe(prompt, init_image=init_image)["sample"][0]
|
28 |
images_list = pipe([prompt] * 2, init_image=init_image, strength=0.75)
|
29 |
images = []
|