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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
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
- 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)
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,