Update app.py
Browse files
app.py
CHANGED
@@ -35,13 +35,16 @@ def generate(image_editor, prompt, neg_prompt, strength, guidance):
|
|
35 |
|
36 |
layer = image_editor["layers"][0].resize(image.size)
|
37 |
|
38 |
-
|
39 |
-
layer = squarify_image(layer).convert('RGBA')
|
40 |
|
41 |
|
42 |
mask = Image.new("RGBA", image.size, "WHITE")
|
43 |
mask.paste(layer, (0, 0), layer)
|
44 |
mask = ImageOps.invert(mask.convert('L'))
|
|
|
|
|
|
|
|
|
45 |
|
46 |
|
47 |
final_image = pipeline(prompt=prompt,
|
|
|
35 |
|
36 |
layer = image_editor["layers"][0].resize(image.size)
|
37 |
|
38 |
+
|
|
|
39 |
|
40 |
|
41 |
mask = Image.new("RGBA", image.size, "WHITE")
|
42 |
mask.paste(layer, (0, 0), layer)
|
43 |
mask = ImageOps.invert(mask.convert('L'))
|
44 |
+
|
45 |
+
|
46 |
+
image = squarify_image(image)
|
47 |
+
layer = squarify_image(layer)
|
48 |
|
49 |
|
50 |
final_image = pipeline(prompt=prompt,
|