Virginia Democrats, mired only a few weeks ago in a bitter fight over their candidate for governor, open their state convention here Friday in a dramatically different mood, unified and optimistic that the party will retain its power over state government.

State Attorney General Gerald L. Baliles of Richmond is poised to accept the nomination for governor, barely a month after Lt. Gov. Richard J. Davis pulled out of the contest. His withdrawal ended the acrimony that threatened to leave deep party wounds.

With that nomination settled, the Democrats this weekend turn their attention to what many consider the most novel -- and potentially controversial -- ticket in Virginia political history.

Sen. L. Douglas Wilder, a black legislator from Richmond, is the candidate for lieutentant governor and state Del. Mary Sue Terry of rural Patrick County is unopposed for the attorney general nomination -- the first time a black and a woman have been on the party's slate for statewide office.

"The Democratic ticket is at least exciting to people, which is something the Republicans don't have," said George M. Stoddart, spokesman for Democratic Gov. Charles S. Robb. "That goes a long way in politics."

But to some Democrats, the same factors that bring a sense of excitement and interest to their ticket also raise some questions about its electability in one of the most politically conservative states in the nation. Wilder's candidacy has raised the most concern.

"Some people are going to vote against him simply because of his race," said state Sen. Joseph V. Gartlan Jr. (D-Fairfax), who supports Wilder's candidacy.

The party launches its five-month race toward the November general elections with a powerful boost from Robb, who has managed to win praise even from Republicans.

"The party is in the best shape it's ever been in," said Alan A. Diamonstein of Newport News, state party chairman. "We will win unless we make a mistake or throw it away."

Most Democrats say they anticipate an "upbeat" two-day convention dwelling on Robb's popularity and success at presiding over the first Democratic administration in 12 years.

The Democratic convention also promises to be less fractious than the Republican state meeting in Norfolk last week, where Richmond attorney Wyatt B. Durrette was nominated for governor. Durrette's nomination was overshadowed by a divisive competition for lieutenant governor.

After four ballots that dragged late into the night, weary delegates nominated state Sen. John H. Chichester of Fredericksburg for the second place on the ticket over four other candidates. W. R. (Buster) O'Brien of Virginia Beach is the GOP nominee for attorney general.

The Democrats, usually torn by internal party feuds, enter this year's convention with no party contests for any of the three seats.

Although the contest for the gubernatorial nomination was hardfought until late April, neither Wilder nor Terry faced competition for their nomination.

Wilder, 54, who has raised a modest $177,800 during his 11 months of campaigning, is expected to draw the substantial Virginia black electorate to the ticket. The prospects of alienating that voting bloc may have discouraged many would-be candidates from trying to win the nomination from Wilder.

While several leading Democrats considered running against Wilder, they did not declare their candidacy.

"You'd have to consider the fallout of what would happen to some white who goes in and beats him," said state Sen. Clive L. DuVal II (D-Fairfax). "They would be running with a split in the ranks to start out."

Terry, 37, a protege of powerful Democratic House Speaker A. L. Philpott (D-Patrick), began campaigning for the job more than two years ago. Many party officials say her association with Philpott and her head start in the campaign discouraged other contenders