Danny Leiner, a director who turned the wanderings of the wasted into two successful movies, “Dude, Where’s My Car?” and “Harold & Kumar Go to White Castle,” died on Oct. 18 at his home in Los Angeles. He was 57.

The cause was lung cancer, his sister, Karen Leiner, said.

Mr. Leiner had a knack for spotting talent. His first directing credit was on “Time Expired” (1992), a short film he also wrote whose stars included Edie Falco and John Leguizamo, then still early in their careers. “Layin' Low,” a 1996 comedy he wrote and directed, featured, in addition to Ms. Falco, Jeremy Piven. And his breakthrough film, “Dude, Where’s My Car?” (2000), was among the earliest films of Ashton Kutcher, Seann William Scott and Jennifer Garner.

“Thank you for putting up with that young actor who thought he knew way too much way too soon in his career,” Mr. Kutcher said Saturday on Twitter in a tribute to Mr. Leiner.