tonyassi commited on
Commit
6b4f74e
1 Parent(s): a1deaea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -31,10 +31,13 @@ def generate(image_editor, prompt, neg_prompt, strength, guidance):
31
  image = image_editor['background'].convert('RGB')
32
  image.thumbnail((1024, 1024))
33
  image = divisible_by_8(image)
34
- image = squarify_image(image)
35
 
36
  layer = image_editor["layers"][0].resize(image.size)
37
- layer = squarify_image(layer)
 
 
 
38
 
39
  mask = Image.new("RGBA", image.size, "WHITE")
40
  mask.paste(layer, (0, 0), layer)
 
31
  image = image_editor['background'].convert('RGB')
32
  image.thumbnail((1024, 1024))
33
  image = divisible_by_8(image)
34
+
35
 
36
  layer = image_editor["layers"][0].resize(image.size)
37
+
38
+ image = squarify_image(image)
39
+ layer = squarify_image(layer).convert('RGBA')
40
+
41
 
42
  mask = Image.new("RGBA", image.size, "WHITE")
43
  mask.paste(layer, (0, 0), layer)