The 51-year-old actor feels getting in shape was difficult, reported Contactmusic.
"It was tough to get in shape to play street magician Steve Gray, but now that we are done with shooting, I can regain the weight I lost," said Carrey.
Carrey, who appears shirtless in few scenes in the film, said that it won't be a regular thing.
"I figured that it is Matthew McConaughey's thing."
Carrey is not the only actor to undertake a tough diet for a role, Hugh Jackman had consumed nothing but water for 36 hours to prepare for 'Les Miserables'.