Mask generation for objects using segmentation models

I want to generate masks for objects with a transparent background. I tried using the segment anything model (SAM) by meta. The problem is that the mask generated lacks a smooth and consistent boundary, which is producing bad results on further processing of the generated mask. Is there another way to generate better masks?