Preheat your oven to 350°F (175°C). Grease a 9x13-inch baking dish with non-stick spray or butter.
In a large mixing bowl, combine the chocolate cake mix, water, vegetable oil, and eggs. Mix until well combined and smooth.
Pour the cake batter into the prepared baking dish, spreading it evenly.
In another bowl, beat together the softened cream cheese, powdered sugar, and peanut butter until smooth and creamy.
Drop spoonfuls of the cream cheese mixture over the cake batter. Use a knife or toothpick to swirl the cream cheese mixture into the batter, creating a marbled effect.
Sprinkle the chocolate chips, chopped mini peanut butter cups, and walnuts (if using) evenly over the top of the cake.
Bake in the preheated oven for 30-35 minutes, or until a toothpick inserted into the center comes out clean.
Allow the cake to cool in the pan for about 15 minutes before serving.