RATIONALE: Vaccines may help the body build an effective immune response to kill tumor cells. Colony-stimulating factors, such as GM-CSF, may increase the number of immune cells found in bone marrow or peripheral blood. Giving vaccine therapy together with sargramostim may be an effective treatment for breast cancer and ovarian cancer. PURPOSE: This phase I trial is studying the side effects and identifying the best dose of vaccine therapy when given together with sargramostim in treating patients with stage III-IV breast cancer or ovarian cancer.