  We present a measurement of the evolution of the stellar mass function in
four redshift bins at 0.4 < z < 1.2 using a sample of more than 5000 K-selected
galaxies drawn from the MUNICS dataset. Our data cover the stellar mass range
10^10 < M/Msun < 10^12. We derive K-band mass-to-light ratios by fitting a grid
of composite stellar population models of varying star formation history, age,
and dust extinction to BVRIJK photometry. We discuss the evolution of the
average mass-to-light ratio as a function of galaxy stellar mass in the K-band
and in the B-band. We compare our stellar mass function at z > 0 to estimates
obtained similarly at z=0. We find that the mass-to-light ratios in the K-band
decline with redshift. This decline is similar for all stellar masses above
$10^10 Msun. Lower mass galaxies have lower mass-to-light ratios at all
redshifts. The stellar mass function evolves significantly to z = 1.2. The
total normalization decreases by a factor of ~2, the characteristic mass (the
knee) shifts towards lower masses and the bright end therefore steepens with
redshift. The amount of number density evolution is a strong function of
stellar mass, with more massive systems showing faster evolution than less
massive systems. We discuss the total stellar mass density of the universe and
compare our results to the values from the literature both at lower and higher
redshift. We find that the stellar mass density at z~1 is roughly 50% of the
local value. Our results imply that the mass assembly of galaxies continues
well after $z \sim 1$. Our data favor a scenario in which the growth of the
most massive galaxies is dominated by accretion and merging rather than star
formation which plays a larger role in the growth of less massive systems.
