not-lain commited on
Commit
9dbd7e8
·
1 Parent(s): 1f0016e

remove extra conversion

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -142,7 +142,7 @@ def mask_generation(image=None, d=None):
142
  out = []
143
  for i in range(len(masks)):
144
  m = Image.fromarray(masks[i] * 255).convert("L")
145
- comp = Image.composite(Image.fromarray(image), m, m)
146
  out.append((comp, f"image {i}"))
147
 
148
  return out
 
142
  out = []
143
  for i in range(len(masks)):
144
  m = Image.fromarray(masks[i] * 255).convert("L")
145
+ comp = Image.composite(image, m, m)
146
  out.append((comp, f"image {i}"))
147
 
148
  return out