Woody Allen is getting the “American Masters” treatment this fall with a two-part docu helmed and produced by Robert Weide.

Weide, a seasoned docu filmmaker and a director-exec producer of “Curb Your Enthusiasm,” has been working on the project with Allen’s cooperation for more than a year. He spent a week with Allen in 2009 on the London set of “You Will Meet a Tall Dark Stranger,” and he followed the helmer to Cannes last year for the pic’s preem. Weide was also granted rare access to Allen’s inner sanctum at his home and in the editing room, and Allen even led Weide on a tour of his childhood haunts in the Brooklyn neighborhood of Midwood.

The docu, which has the working title “Woody Allen: A Documentary,” will air in 90-minute segs over two nights on PBS this fall. Weide is exec producing through his Whyaduck Prods., along with Insurgent Media and Brett Ratner’s Rat Prods. Ratner also exec produces along with Michael Peyser, Fisher Stevens, Andrew Karsch, Erik Gordon and “American Master’s” exec Susan Lacy.

Weide has been pushing Allen to submit to a docu on his life and work for more than 20 years. The doc chronicles Allen’s childhood and early career as a TV scribe and standup comic through his most recent pic, “Midnight in Paris,” which will open the Cannes fest next month.

“The prolific nature of Woody’s output has provided me with an embarrassment of riches,” Weide said. “Even with three hours at my disposal I feel the heartbreak of all the things I have to leave out. In fact, Woody will have made three features just in the time it’s taken me to make this one documentary.”

Weide earned an docu Oscar nom for his 1998 pic “Lenny Bruce: Swear to Tell the Truth.” The Allen project takes him back to his roots as a docu maker for PBS in the 1980s with docus “The Marx Brothers in a Nutshell,” “W.C. Fields: Straight Up” and “Mort Sahl: The Loyal Opposition,” among others.

Indeed, Weide sought a return to the docu world after enduring creative tussles on the 2008 feature “How to Lose Friends and Alienate People,” which he helmed.

“I decided it was time for another documentary, which, for me, has always meant no interference,” Weide said. “All of my documentaries cover my artistic and cultural heroes, but Woody Allen was always the big ‘get’ for me.”

A longtime pal of Larry David, Weide also helmed David’s 1999 HBO special that spawned the “Curb Your Enthusiasm” series.