Companies are scrambling to figure out plans for projects marred by disgraced talent. Not every problem has an easy solution.

Kevin Spacey and Louis C.K. exist in different corners of the entertainment world, but their misdeeds are the great equalizers. After reports of their sexual harassment and misconduct made national headlines, the companies that release their work are scrambling to avoid financial disaster.

With “All the Money in the World,” Sony’s saving grace is director Ridley Scott decided to reshoot Spacey’s scenes as J. Paul Getty with Christopher Plummer in the role, speeding toward a release date that’s less than a month away. Meanwhile, C.K.’s black-and-white cringe comedy “I Love You, Daddy” lies in the hands of U.S. distributor The Orchard — notably, also a Sony property — which canceled the movie’s premiere shortly before the New York Times story about C.K. ran, then went into crisis mode: First, the company issued a statement that it would reevaluate release plans for the movie one week for its opening; by the next morning, The Orchard announced that it would “not be moving forward” with releasing the movie at all.

Both situations provide a window into a new kind of business quandary when exciting talent morphs into commercial anathema. “All the Money in the World” represents a huge financial investment for Sony, but the studio responded to pressure from an A-list director with enormous power and influence, one who can be trusted to pull off this technological and artistic feat.

The Orchard is an arthouse distributor dealing with a once-edgy festival breakout that’s now toxic. Presumably under pressure from C.K. —one of America’s most prominent comedians, and therefore powerful in his own right — the company committed to releasing the movie in a crowded fall season after paying a whopping $5 million at Toronto International Film Festival. With the New York Times’ story Wednesday afternoon, a tricky proposition became a contaminated project that’s in dire need of a solution.

C.K.’s work walks a fine line between cringe comedy and miserable discomfort, and “I Love You, Daddy” epitomizes that approach. Its “Manhattan”-like story follows a successful television producer (C.K.) whose wayward teen daughter (Chloe Grace Moretz) appears to start dating a much-older filmmaker (John Malkovich) accused of sleeping with underage girls.

At TIFF, stories about CK’s years of misdeeds had already started percolating, and Tig Notaro blasted the comedian for his behavior in a widely circulated interview. C.K. dodged art-imitating-life questions in his interviews, with some at the festival theorizing that he designed his movie to mess with audience assumptions about his real-life behavior. The movie includes a scene in which C.K.’s character tells his daughter, “You shouldn’t say things about someone’s private life when you don’t know them,” and ends with one character concluding that, “Everyone’s a pervert.”

Audiences gave the film a warm reception at the TIFF premiere, with adoring fans peppering C.K. with praise during the Q&A. In the traditional festival ecosystem, that indicates a movie with genuine crowdpleasing potential, something that could be nurtured to scale with a careful release strategy based on word of mouth.

Invision/AP/REX/Shutterstock

But that was September 9, and it was a very different world. As TIFF came to a close, stories broke about sexual harassment involving L.A.’s Cinefamily, the Alamo Drafthouse, and Ain’t It Cool News’ Harry Knowles. On October 5, the first story about Harvey Weinstein’s sexual harassment history came out in the New York Times. That story grew monstrous, and it’s been followed with what seems like an endless litany on-the-record accusations against Kevin Spacey, Brett Ratner, Amazon’s Roy Price, agents, and other executives. Projects collapsed, deals went south, anyone closely associated with the accused issued statements distancing themselves and claiming higher moral ground. Except when they couldn’t.

Such is the situation with “I Love You, Daddy.” At TIFF, C.K. said in a statement that he found The Orchard’s “approach to releasing the movie to be thoughtful and creative.” That’s accurate: The 20-year-old company, which started as a music distributor in 1997, has worked to find its groove in independent film by experimenting with theatrical windows and VOD strategies, much as C.K. himself has explored original approaches to releasing his own efforts. In addition to directing and editing his F/X show “Louie,” he self-distributed his dramatic mini-series “Horace and Pete” on his own site, where he first started selling his comedy specials over 15 years ago. He also has a massive email list that ensures direct connection with his fans.

However, in landing a high-profile figure, The Orchard may have ceded too much control. C.K. evidently insisted on a fall release for “I Love You, Daddy,” even as the climate surrounding issues of sexual misconduct became increasingly charged. All parties realized pushing the movie into 2018 would solve nothing.

Sources close to the deal say that The Orchard knew a Times story was imminent, but the deal terms made it difficult to reconfigure the release plan. Even so, both parties fell short of recognizing just how much the world has changed.

For The Orchard, “I Love You, Daddy” reflects the challenges that face aggressive buyers that want to establish themselves in a very competitive marketplace. In 2015, the distributor spent $1 million on the low-budget sex comedy “The Overnight” at Sundance; in 2016, it bought the dreary Rebecca Hall character study “Christine.” Neither movie was a huge box office success, though The Orchard did manage significant results with Taika Waititi’s New Zealand comedy “Hunt for the Wilderpeople,” one of the biggest hits of last summer’s specialty release market, and this year’s “The Hero,” which has pulled in $4 million this year, making it the third highest-grossing Sundance title of the year.

The Orchard’s conundrum resembles the one faced by Fox Searchlight in 2016, when it spent a record $17.5 million on Nate Parker’s “The Birth of a Nation,” only to see the movie’s commercial and awards season potential collapse after reports of Parker’s college rape scandal resurfaced. Suddenly, buyers realized that they needed to look more closely at the backgrounds of filmmakers and actors before going into business with them.

In retrospect, the “Birth of a Nation” catastrophe looks like the canary in the coal mine. How does a distributor extricate itself from a contractual commitment — or, at the very least, minimize the damage? When a company is in the red for millions, that question may have no firm answer. The entertainment world is realizing only now that the cost of letting people get away with bad behavior runs much deeper than the end of their careers. It’s bad business for everyone.

—Additional reporting by Anne Thompson and Chris O’Falt

This article has revised with box office data about “The Hero.”

Sign Up: Stay on top of the latest breaking film and TV news! Sign up for our Email Newsletters here.