 PURPOSE: This randomized phase I trial is studying the side effects and best way to give vaccine therapy with or without imiquimod in treating patients who have undergone surgery for stage II, stage III, or stage IV melanoma. 