Are you actually in a relationship with someone who has gained weight because (in your opinion) that person is lazy, greedy and stupid?
If that's the case (and bearing in mind that there are a variety of reasons for substantial weight gain and anyone who thinks it's just a matter of eating too much and doing no exercise is a fucking idiot) then I can sort of understand it being a bit of a turn-off. If someone is constantly eating while gawping at the television, and shows no interest in the relationship and no willingness to contribute anything, then, yeah, that might be unappealing. But that's often not what;s going on. Don't forget that we live in a world where fat people are hated and despised, and many very fat people started off as mildly chubby, but were bullied and shamed until they bought into the toxic and useless 'slimming industry. Dieting pretty much invariably leads to longterm, persistent weight gain because it messes with the metabolism.
I'm not an expert on maintaining sexual desire in longterm relationships, OP, because I have no interest in longterm relationships in the first place. But those who do participate in them often seem to be fairly happy with one another and still mutually attracted: desire is not always about body shape or appearance. Again, remember that many, many people do not look like models or celebrities but they still manage to have sex lives; their desirability isn't particularly to do with their body shape in the first place.
If you are unhappy in your relationship, you don't need anyone else's permission to end it. And it doesn't actually matter if your reasons for wanting to end it might seem 'trivial' to other people - it's up to you who you have sex with or find desirable. But it is a bit of a mistake to focus solely on 'sex appeal' as being a matter of thinness, youth, fashionableness, clear skin etc. You may never get FAT yourself, but you will get old. Will you be happy to accept that your sex life is over because other people judge you to be no longer fuckable, when the day comes?