Heat the oven to 350°F with a rack in the center. Line a 12-cup muffin pan with liners; parchment-style liners release most cleanly.
In a medium bowl, whisk together the flour, baking powder, baking soda, and salt until well combined so the baking soda is evenly distributed.
Peel and mash the bananas until mostly smooth with a few small lumps. Weigh out exactly 350 g. If using frozen bananas, thaw and drain off the watery liquid before weighing.
Melt the butter and let it cool about 5 minutes. Stir in the dark brown sugar; it will look thick and grainy.
Whisk in the eggs, mashed banana, sour cream, discard, and vanilla until evenly combined.
Pour the wet mixture into the dry ingredients. Fold gently with a spatula until most of the flour disappears.
Add about 100 g of the walnuts (if using), reserving the rest for the tops, and fold a few more times. Stop as soon as no dry flour pockets remain. Do not overmix.
Divide the batter among the 12 cups. Sprinkle the reserved walnuts over the tops.
Bake at 350°F for 20 to 25 minutes, checking at 20. They're done when the tops spring back, the centers are set, and a toothpick shows a few moist crumbs but no wet batter. Do not bake until the toothpick is completely dry.
Cool in the pan 10 minutes, then transfer to a rack. Wait another 10 to 15 minutes before splitting one open, as they continue to set while cooling.