Remove background from AI-generated images using two-pass difference matting.
Generate the same image on white and black backgrounds, then extract pixel-perfect transparency.
2 in the Claude listing