aryswisnu commited on
Commit
fb65895
·
1 Parent(s): 28c2469

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -61,7 +61,7 @@ def extract_image(img, pos_prompts, neg_prompts, threshold, alpha_value=0.5):
61
  # convert PIL image to RGBA numpy array
62
  img_np = np.array(img.convert("RGBA"))
63
  # create an empty RGBA image with the same size
64
- output_image = np.zeros_like(img_np)
65
 
66
  # apply the final_mask as alpha channel on the output image
67
  output_image[:, :, :3] = img_np[:, :, :3]
 
61
  # convert PIL image to RGBA numpy array
62
  img_np = np.array(img.convert("RGBA"))
63
  # create an empty RGBA image with the same size
64
+ output_image = np.zeros_like(img_np, dtype=np.uint8)
65
 
66
  # apply the final_mask as alpha channel on the output image
67
  output_image[:, :, :3] = img_np[:, :, :3]