Update app.py
Browse files
app.py
CHANGED
@@ -36,15 +36,15 @@ def generate(image_editor, prompt, neg_prompt, strength, guidance):
|
|
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 |
-
|
47 |
-
layer = squarify_image(layer)
|
48 |
|
49 |
|
50 |
final_image = pipeline(prompt=prompt,
|
|
|
36 |
layer = image_editor["layers"][0].resize(image.size)
|
37 |
|
38 |
|
39 |
+
image = squarify_image(image)
|
40 |
+
#layer = squarify_image(layer)
|
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 |
+
|
|
|
48 |
|
49 |
|
50 |
final_image = pipeline(prompt=prompt,
|