How to stay motivated when people around you have an unhealthy lifestyle?

Last year, I was able to lose 50lbs by sticking with a consistent low-carb diet. I was living with a family member who also ate pretty healthy and would keep me on track if I ever tried to stray from my diet. I know exactly what I need to do to keep my weight down,but now a year later I’ve gained 30lbs…what changed? Well I started living with my husband (we were apart before because he had to work in a different city that year so it was easier to stay with my family member)

My husband eats a lot of junk and I really lack self control when it comes to food because I love it. This has made me feel like a failure and every time I try to get back on track , I am tempted with another box of cookies that he buys, and he doesn’t necessarily push me to stick to my diet. This really effects me because I just feel like giving up, I feel like food is my addiction and it’s so hard to say no when I know that there’s something in the kitchen that’s screaming my name. How do you stay motivated when the people around you are on a different path ??