Heat sugar over medium-high heat, stirring until melted. Carefully pour into your mold.
If using fresh pumpkin, peel and cut into ½ inch cubes, and cook until tender. Skip if using canned pumpkin puree.
Blend pumpkin, evaporated milk, condensed milk, vanilla, eggs, cinnamon, and allspice.
Pour the mixture into the mold. Place mold in a large baking pan and fill the pan with water to create a bain marie.
Bake in the oven for 1 hour.
Cool the flan, loosen it from the mold with a knife, and shake gently.
Place a large, deep dish over the mold and quickly flip to unmold the flan.