Federally financed educational materials about AIDS would have to stress sexual abstinence and could not promote homosexuality or drug use under a measure approved yesterday by the Senate.

The 94-to-2 vote came after Sen. Jesse Helms (R-N.C.) raised the issue of sexually explicit comic books distributed by the Gay Men's Health Crisis in New York. He said the group receives federal money and he proposed restrictions on material paid for by taxpayers.

"If the American people saw these books, they would be on the verge of revolt," Helms said. He said the books "promote sodomy."

The $129 billion labor, health and human services and education appropriations bill for fiscal 1988, which passed 80 to 15 last night, earmarks more than $946 million for AIDS research, prevention, information and education in a major expansion of activity to curb acquired immune deficiency syndrome.

There has long been conflict among lawmakers and the administration about what federal AIDS educational materials should say and how graphic they should be.

Helms said the Gay Men's Health Crisis received $674,679 from the federal government to create educational materials. He acknowledged that the comic books were not paid for with federal funds, but said a series of U.S.-funded educational sessions were equally offensive.

"I just want the American taxpayer's dollars to be spent in a moral way," Helms said.

Sens. Lowell P. Weicker Jr. (R-Conn.) and Daniel Patrick Moynihan (D-N.Y.) voted against the amendment.