lease alpha to imageremovebg

This commit is contained in:
cubiq
2024-08-30 14:34:46 +02:00
parent 3777c5d1ce
commit c861cd6baf
+2 -1
View File
@@ -842,8 +842,9 @@ class ImageRemoveBackground:
output = torch.stack(output, dim=0)
output = output.permute([0, 2, 3, 1])
mask = output[:, :, :, 3] if output.shape[3] == 4 else torch.ones_like(output[:, :, :, 0])
# output = output[:, :, :, :3]
return(output[:, :, :, :3], mask,)
return(output, mask,)
"""
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~