In a large heavy pot, combine sugar, vinegar, ginger, cumin, cinnamon & pepper flakes. Bring to a simmer over low heat, stirring until sugar dissolves. Add peaches & onion; increase heat to medium high & cook until peaches are tender & mixture thickens. Cool. ( I prefer to make this a day ahead).