We present here a theoretical model to account for the stellar initial mass function (IMF) as a result of the composite behaviour of the gas and dust distribution functions. Each of these has previously been modelled and the models tested against observations (Casuso & Beckman 2002, 2007, 2010). The model presented here implies a relation between the characteristic size of the dust grains and the characteristic final mass of the stars formed within the clouds containing the grains, folded with the relation between the mass of a gas cloud and the characteristic mass of the stars formed within it. The physical effects of dust grain size are due to equilibrium relations between the efficiency of grains in cooling the clouds, which is a falling function of grain size, and the efficiency of grains in catalysing the production of molecular hydrogen, which is a rising function of grain size. We show that folding in the effects of grain distribution can yield a reasonable quantitative account of the IMF, while gas cloud mass function alone cannot do so.