Update app.py
Browse files
app.py
CHANGED
@@ -35,10 +35,10 @@ def resize(width,img):
|
|
35 |
return img
|
36 |
|
37 |
def infer(prompt, init_image):
|
38 |
-
|
39 |
-
|
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 = []
|
43 |
safe_image = Image.open(r"unsafe.png")
|
44 |
for i, image in enumerate(images_list["sample"]):
|
|
|
35 |
return img
|
36 |
|
37 |
def infer(prompt, init_image):
|
38 |
+
init_image = resize(512,init_image)
|
39 |
+
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.png", strength=0.75)
|
42 |
images = []
|
43 |
safe_image = Image.open(r"unsafe.png")
|
44 |
for i, image in enumerate(images_list["sample"]):
|