Preheat your oven to 350°F (175°C). Grease and flour the loaf pan or line it with parchment paper.
In a mixing bowl, mash the ripe bananas until smooth. Set aside.
In another bowl, beat the softened cream cheese with an electric mixer until smooth and creamy. Add the granulated sugar and brown sugar, and mix until combined.
Add the softened butter to the cream cheese mixture, and beat until light and fluffy. Incorporate the eggs one at a time, followed by the vanilla extract.
Stir in the mashed bananas until well combined.
In a separate bowl, whisk together the flour, baking soda, and salt.
Gradually add the dry ingredients to the wet mixture, stirring with a rubber spatula until just combined. If desired, fold in the chopped walnuts or pecans.
Pour half of the banana bread batter into the prepared loaf pan. Spoon the cream cheese mixture over this layer, and then top with the remaining banana bread batter.
Use a butter knife to gently swirl the cream cheese mixture into the batter for a marbled effect.
Bake in the preheated oven for 60 minutes or until a toothpick inserted into the center comes out clean.
Allow the bread to cool in the pan for about 10 minutes before transferring it to a cooling rack.