Mr. Weber and Mr. Testino have been deeply embedded in the history of image-making at Vogue and its peer publications, such as GQ and Vanity Fair.

In a statement to The New York Times, Mr. Weber said the allegations of the models were “untrue” and that he had “never touched anyone inappropriately.” Lawyers for Mr. Testino objected to the allegations and called the credibility of the men who said they were harassed into question.

Condé Nast began working on the code not long after dozens of women accused the Hollywood producer Harvey Weinstein of sexual misconduct in articles by The Times and The New Yorker, the company said. Along with Ms. Wintour, the initiative was spearheaded by Mr. Sauerberg and Jonathan Newhouse, chief executive of Condé Nast International, which will also adopt the code. (It may be modified to make it relevant for different countries and cultures.)

“A crisis often results in action,” Ms. Wintour said.

Though the fashion industry has been known to overlook sexual harassment in the past, there are indications, like the new Condé Nast policy, that it is beginning to push for systemic change.

Under its new guidelines, the company will no longer work with models who are younger than 18. There will be no alcohol on photo sets. Photographers will not be allowed to use the set for personal work after a commissioned shoot is completed, and it is recommended that models not be left alone with photographers, makeup artists or other contributors. Any nudity or “sexually suggestive poses” in the shoot will be detailed beforehand and agreed to in advance by the subject. There will be an anonymous reporting line for any violations.