We present a systematic study of capillary filling for multi-phase flows by using mesoscopic lattice Boltzmann models describing a diffusive interface moving at a given contact angle with respect to the walls. We compare the numerical results at changing the density ratio between liquid and gas phases, d¿/¿ and the ratio, d¿/H, between the typical size of the capillary, H, and the interface width, d¿. It is shown that numerical results yield quantitative agreement with the Washburn law when both ratios are large, i.e. as the hydrodynamic limit of a infinitely thin interface is approached. We also show that in the initial stage of the filling process, transient behaviour induced by inertial effects and "vena contracta" mechanisms, may induce significant departure from the Washburn law. Both effects are under control in our lattice Boltzmann equation and in good agreement with the phenomenology of capillary filling.