With shooting about to begin, Joseph Gordon-Levitt has replaced James McAvoy as the lead opposite Seth Rogen in Summit/Mandate’s comedy formerly titled “I’m With Cancer.”

Summit announced Tuesday that McAvoy had left the production “due to unrelated circumstances beyond his control.” The mini-major didn’t elaborate.

The untitled film will begin shooting next the week in Vancouver. Anna Kendrick, Bryce Dallas Howard, Anjelica Huston and Philip Baker Hall also star.

Rogen, who’s also a producer on the project, said in a statement: “It’s incredibly unfortunate that circumstances outside of everyone’s control have taken James away from the project, but, with James’s blessing, we were able to have Joseph step in to take on the role of Adam. We all look forward to working with James in the future.”The film is directed by Jonathan Levine from a script by Will Reiser. Project is produced by Rogen, producing partner Evan Goldberg and former “Daily Show” exec producer Ben Karlin. Reiser is exec producing along with Mandate Pictures president Nathan Kahane.

Gordon-Levitt, who broke out last year in “500 Days of Summer,” will portray a man who learns he has cancer and successfully battles the disease over several years. Character is based on the real experiences of screenwriter Reiser, who won his own fight with cancer in his mid-20s.

Gordon-Levitt’s credits include the upcoming “Inception,” recent Sundance entry “Hesher” and “Brick.”

He’s repped by CAA.