Tesla Inc. CEO Elon Musk famously served as the inspiration for Robert Downey Jr.’s depiction of billionaire genius Tony Stark in Marvel’s “Iron Man” movies.

Now he’s trying to avoid a real-life Ultron moment.

In the fictional Marvel universe, Stark originally designed Ultron, an artificial intelligence program, to protect Earth. But when it gained sentience, it turned on its creators and attempted to destroy humanity.

Musk doesn’t think it’s the stuff of fiction. Although his Tesla vehicles come with boundary-pushing driver-assist features, he has called AI humankind’s “biggest existential threat,” tweeted that it’s “potentially more dangerous than nukes” and referred to dabbling with AI as “summoning the demon.”

He’s taken a more fatalist approach in recent years, lamenting that his warnings have gone unheeded.

“I tried to convince people to slow down AI, to regulate AI; this was futile … nobody listened,” he said on a 2018 podcast with comedian Joe Rogan. “It could be terrible and it could be great. It’s not clear. One thing’s for sure: We will not control it.”

Musk has suggested the best option is to merge AI with the human mind. In 2017, he launched a startup, Neuralink, to work on a “high-bandwidth brain-machine interface” and has suggested he’d soon release an “awesome” update on the initiative.

Sachin Lulla, an AI expert who serves as global digital strategy and transformation leader at EY, tends to offer a more optimistic view on artificial intelligence, although he believes caution is necessary.

“As mankind develops any major breakthrough, they figure how to put the right checks and balances in place,” Lulla said. “We need to do so in this case.”

Unlike Musk, he thinks the world has listened to those early calls to regulate the still-emerging technology.

Last year, the European Commission released “ethics guidelines for responsible AI,” and Lulla said countries such as Canada and Singapore have adopted similar stances. EY last year released its own “trusted AI platform” that it hopes will lead to greater confidence in the technology.

“If we take the right steps now, with trusted and responsible AI solutions, and a public-private sector partnership, I think we can continue to use AI to do more good that otherwise,” Lulla said. “I’ve always been an optimist when it comes to technology.”

Even Musk is coming around.

He tweeted that he planned to host a “super fun” AI party/hackathon as Tesla works to improve its Autopilot driver-assist system and eventually activate self-driving software.

“Just like anything, there’s an optimistic side and a pessimistic side,” Lulla said. “I believe Elon’s intent was good. He’s made a fortune applying AI in the world’s most intelligent vehicles.”