Preheat the oven to 350°F (175°C). Line a 12-cup muffin tin with paper liners.
In a large bowl, whisk together the almond flour, granulated erythritol, cinnamon, nutmeg, baking powder, and salt.
Add the eggs, melted coconut oil, and vanilla extract. Mix until well combined. Fold in the grated carrots and chopped walnuts.
Divide the batter evenly among the 12 muffin cups, filling each about three-quarters full.
Bake for 22-25 minutes until a toothpick inserted in the center comes out clean. Let cool in the tin for 5 minutes, then transfer to a wire rack to cool completely.
While the cupcakes cool, beat the cream cheese and butter together until fluffy. Add the powdered erythritol and vanilla, then beat until smooth and creamy.
Frost each cooled cupcake generously with the cream cheese frosting. Sprinkle with a pinch of cinnamon or extra chopped walnuts if desired.