Position oven racks in the middle of the oven. And preheat oven to 375°F (190°C).
Unroll the puff pastry sheet, and cut it into 24 equal squares. Each square will be around 2 or 2.5 inches in size.
Spray a mini muffin pan with non-stick spray, and press a puff pastry square into each cup.
Cut the brie cheese into 24 pieces, and place one brie piece into the center of each puff pastry cup. Top with 1 teaspoon of cranberry sauce, sprinkle sea salt flakes, and top with chopped pecans or walnuts.
Bake for 15-18 minutes or until the puff pastry is puffed and golden. Take the muffin pan out of the oven, and let the brie bites cool for 5 minutes.
Transfer to a serving plate, and serve with fresh rosemary sprigs.