Remove the paint. Combination of a heat gun, triangle scraper, Citristrip, water, scouring pad and patience.
It'll be easier if you can remove the window itself from the frame embedded in the house...
Sanding....120 grit paper folded over a cork block or if you want to uneccesarily tool up....a detail sander