(CNN) -- Jason Segel's weight loss is no joke.
The 33-year-old star of "How I Met Your Mother" has been working to slim down for an upcoming comedy called "Sex Tape," and recent photos show his efforts are paying off. Last week, Segel was photographed in Boston, where the movie has been filming, with a noticeably slimmer face and frame.
In July, the actor told Us Weekly that he wanted to be in top shape for the R-rated feature, which also stars Cameron Diaz.
"I've just been living healthy, exercising, eating right -- no more midnight pizzas," Segel told the magazine. "This time when I take my shirt off, I've made a promise to myself, it doesn't have to be funny."
It seems the star previously "took heat" for his naked bod in the 2008 comedy "Forgetting Sarah Marshall," but he said he understands that "different characters require different body types."
His new comedy, about a married couple who make a sex tape only to wake up and find it missing, is going to be on the raunchy side -- "and I'm not in shape for no reason," he said.
"Sex Tape" is scheduled to arrive in July.