Disgraced comedian Louis C.K. — who has courted controversy by showing up unannounced and performing at the Comedy Cellar — was back at the legendary West Village club on Wednesday, spies told Page Six. While some guests walked, there was at least one A-list supporter in the crowd — Chris Rock.

“Louis came on last during the 9:30 p.m. show,” said a source. “Like 10 people walked out. One yelled a slur, something like ‘F - - k you’ or something. He just ignored it. A few more people walked out midway through, [but] they may have been waiting for their check.”

We hear that C.K. did get support from longtime friend Rock.

“Chris walked in when Louis was on and left right after. He was laughing at all of his jokes,” said the witness.

The two have been associated since at least the ’90s, when C.K. worked on HBO’s “The Chris Rock Show” for three years. C.K. has admitted to harassing and masturbating in front of a woman who worked on the same show.

During his latest unannounced stand-up set, C.K. made a joke about the allegations against him. “He joked about his mom, saying he was in the New York Times, and he had to be like, ‘Mom, that’s not a good article.’ But that moms don’t understand,” a spy said.

In November, five women recounted to the New York Times sexual misconduct by C.K., which he confirmed.

We’re told the rest of C.K.’s set “had a lot of sexual jokes, but just in general, not about what happened.” And that C.K. “seemed nervous. He had a notebook with him to remember the jokes.”

C.K. popped by the club in August and another time this month, causing backlash.

The club now prints “Swim at your own risk” on tickets and has a disclaimer: “If an unannounced appearance is not your cup of tea, you are free to leave (unobtrusively please), no questions asked, your check on the house.”

A manager at the club said: “We did have one large party walk out…We didn’t charge them… The set was absolutely not all sexual and he was not uncomfortable. Also a party of women came up to him after the set, hugged him and told him how much they supported him.”

Rock’s rep didn’t comment.